Browse papers

1 papers

A Comparative Experimental Analysis of PostgreSQL and MongoDB

Primeswat · Aug 15, 2026

The selection of an appropriate database management system is an important consideration in modern software applications, particularly as data volumes and application workloads increase. Relational databases such as PostgreSQL provide structured data management, indexing, and strong transactional capabilities, while document-oriented NoSQL databases such as MongoDB emphasize flexible data representation and efficient write-oriented workloads. However, database performance is highly dependent on workload and experimental environment. This study presents a controlled experimental comparison of PostgreSQL and MongoDB under increasing data volumes. Four dataset sizes—10,000, 50,000, 100,000, and 500,000 records—were evaluated. The experiment measured bulk-write execution time and indexed point-read latency. Each configuration was executed five times. For the read experiment, 1,000 indexed point lookups were performed during each measurement. Mean, median, standard deviation, minimum, maximum, and coefficient of variation were considered during analysis. The results indicate that MongoDB achieved lower mean bulk-write execution times for the 10,000, 50,000, and 100,000 record datasets. At 500,000 records, PostgreSQL had a lower mean write time, although MongoDB's result was strongly affected by a single 109.34-second run. For indexed point reads, PostgreSQL produced lower mean latency at all four dataset sizes. These findings support the view that neither database can be considered universally superior; instead, database selection should be based on workload characteristics, indexing strategy, and performance requirements. Keywords: PostgreSQL, MongoDB, SQL, NoSQL, database performance, benchmarking, indexed reads, bulk writes, scalability, performance evaluation.

Comparative Analysis of PostgreSQL and MongoDB