A Comparative Performance Evaluation of SQL and NoSQL Databases Under Different Indexing and Cache Conditions
Year: 2026
Type: preprint
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.
Source: Research Square
Authors: Amir Khan, Sawaira Gull, Arooj Shahzadi
Language: English
Subfield: Information Systems
Field: Computer Science
Domain: Physical Sciences
Open Access status: green
OpenAlex ID: W7226018284
