Comparative Analysis of Execution Time Performance and Memory Usage Efficiency Between PostgreSQL 18 and MySQL 8.0 Using The TPC-H SF-1 Benchmark

  • Rizky Ilham Febrianto Universitas Mulia, Balikpapan, Indonesia
  • Muhammad Rofian Noor Universitas Mulia, Balikpapan, Indonesia
Keywords: PostgreSQL, MySQL, Complex Queries, Memory Efficiency, TPC-H Benchmark

Abstract

Selection of a Relational Database Management System (RDBMS) directly impacts the performance of analytics processing. PostgreSQL and MySQL are two widely used open-source RDBMSs, yet previous studies often relied on simple query operations, omitted standard benchmarks, or neglected database process memory consumption. This study evaluates and compares query latency and peak memory efficiency between PostgreSQL 18 and MySQL 8.0 (InnoDB storage engine) under complex workloads. Controlled quantitative experiments were conducted using the standard TPC-H SF-1 dataset (1 GB), nine complex analytical queries (Q1, Q2, Q3, Q5, Q7, Q8, Q9, Q10, Q21), equalized memory parameters (25% RAM buffer pool, 64 MB operational buffers), and four repeated executions under warm cache conditions. Query latency was captured from the client side, while peak memory usage was recorded from database processes. The results reveal that PostgreSQL achieved lower execution latency in 8 out of 9 queries, with a median speedup ratio of 8.67x over MySQL. Conversely, MySQL demonstrated superior memory efficiency, consuming up to 80% less peak memory across all complex queries due to its thread-per-worker architecture and constrained buffer allocations. Consequently, PostgreSQL is strongly recommended for high-performance analytical processing, whereas MySQL is ideal for memory-constrained environments.

References

Ahsa, S. H., Syahputra, M. B., Putri, A. F. F. M., & Prasetyo, A. A. (2023). Perbandingan Waktu Respon Operasi Query Dasar MySQL dan PostgreSQL. Prosiding Seminar Nasional Teknologi dan Sistem Informasi (SITASI) 2023, Surabaya, 120–127.

Anneser, C., Tatbul, N., Cohen, D., Xu, Z., Pandian, P., Laptev, N., & Marcus, R. (2023). AutoSteer: Learned Query Optimization for Any SQL Database. Proceedings of the VLDB Endowment, 16(12), 3515–3527. https://doi.org/10.14778/3611540.3611544

Ferrari, L., & Pirozzi, E. (2020). Learn PostgreSQL: Build and manage high-performance, reliable, and scalable PostgreSQL database solutions. Packt Publishing.

Firdaus, R. A., & Ashari, A. (2015). Basis data paralel pada sistem multikomputer menggunakan PostgreSQL-MPI. Seminar Nasional Teknologi Informasi dan Multimedia (Semnastiknomedia), 3(1), 1.3-19–1.3-24.

Gunawan, D. (2016). Evaluasi Performa Pemecahan Database dengan Metode Klasifikasi pada Data Preprocessing Data Mining. Khazanah Informatika: Jurnal Ilmiah Komputer dan Informatika, 2(1), 10–13.

Hellerstein, J. M., Stonebraker, M., & Hamilton, J. (2007). Architecture of a Database System. Foundations and Trends in Databases, 1(2), 141–259. https://doi.org/10.1561/1900000002

Hendra, & Andriyani, W. (2020). Studi Komparasi Menyimpan dan Menampilkan Data Histori Antara Database Terstruktur MariaDB dan Database Tidak Terstruktur InfluxDB. Jurnal Teknologi Technoscientia, 12(2), 168–174.

IEEE. (2023). Performance Evaluation of Relational Database Management Systems: PostgreSQL vs MySQL. IEEE Xplore Digital Library, Document ID: 10223568. https://doi.org/10.1109/IEEECONF.2023.10223568

Junaidi, A. (2016). Studi perbandingan performansi antara MongoDB dan MySQL dalam lingkungan big data. Annual Research Seminar (ARS), 2(1), 460–465.

Kalay, M. U. (2025). Concurrency Challenges in Database Systems: A Focus on PostgreSQL. Bilgisayar Bilimleri ve Teknologis Dergisi, 6(1), 45–52.

Leis, V., Gubichev, A., Mirchev, A., Boncz, P., Kemper, A., & Neumann, T. (2015). How Good Are Query Optimizers, Really? Proceedings of the VLDB Endowment, 9(3), 204–215.

Praba, A. D., & Safitri, M. (2020a). Studi Perbandingan Performansi Antara MySQL dan PostgreSQL. Jurnal Informatika dan Komputer, 8(2), 89–96.

Salunke, S. V., & Ouda, A. (2024). A Performance Benchmark for the PostgreSQL and MySQL Databases. Future Internet, 16(10), Article 382. https://doi.org/10.3390/fi16100382

Silalahi, M., & Wahyudi, D. (2018). Perbandingan Performansi Database MongoDB dan MySQL dalam Aplikasi File Multimedia Berbasis Web. CBIS (Computer Based Information System) Journal, 6(1), 63–78.

Transaction Processing Performance Council (TPC). (2022). TPC Benchmark H (Decision Support) Standard Specification Version 3.0.0. Transaction Processing Performance Council.

Wibowo, A., & Wiguna, W. (2019). Migrasi Database MySQL ke PostgreSQL pada Aplikasi Sistem Informasi Akademik. Jurnal Routers Polinela, 1(1), 22–29.

Wong, K. L., & Chen, H. (2023). Comparative Memory Footprint Analysis of Thread-Based vs Process-Based Database Architectures. International Journal of Computer Science and Network Security, 23(8), 91–99.

Zhang, Y., Chronis, Y., Patel, J. M., & Rekatsinas, T. (2023). Simple Adaptive Query Processing vs. Learned Query Optimizers: Observations and Analysis. Proceedings of the VLDB Endowment, 16(11), 2962–2975.

Published
2026-11-15
How to Cite
Febrianto, R. I., & Noor, M. R. (2026). Comparative Analysis of Execution Time Performance and Memory Usage Efficiency Between PostgreSQL 18 and MySQL 8.0 Using The TPC-H SF-1 Benchmark. International Journal of Science and Society, 8(4), 1017-1023. https://doi.org/10.54783/ijsoc.v8i4.1862