A Comparative Performance Evaluation of SQL and NoSQL Databases Under Different Indexing and Cache Conditions
Abstract This study presents a comparative benchmark of MySQL 8.0.46 and MongoDB 8.0.32 using bulk-write, point-lookup, and filtered-aggregation workloads. Experiments were conducted on a single Ubuntu-based computer using synthetic transaction datasets containing 10K, 100K, and 1M records. Performance was measured under unindexed, indexed, and warm-cache conditions, with five measured iterations per configuration. MongoDB recorded lower bulk-write latency at all dataset sizes. Single-field indexing substantially reduced point-lookup latency in both database systems, with reductions exceeding 99% at one million records. Aggregation results varied according to dataset size and configuration. At one million records, MySQL's indexed aggregation latency was higher than its unindexed latency; an independent remeasurement reproduced this result under the tested conditions. These findings demonstrate that database performance depends on workload, dataset size, indexing, and execution state. The study does not establish a universal advantage for either database model. Instead, it provides a controlled, single-host comparison and identifies directions for further investigation, including composite indexes, concurrent workloads, and distributed deployments.
Authors
- Arooj Shahzadi
- Sawaira Gull
- Amir Khan
Institutions
- Government College University, Faisalabad (PK)
- Thal University Bhakkar (PK)
Publication Details
- Journal
- Research Square
- Published
- 2026-11-13
- DOI
- https://doi.org/10.21203/rs.3.rs-11275727/v1
- Primary Topic
- Advanced Database Systems and Queries
- Type
- preprint