ANALISIS EFEKTIVITAS TEKNIK INDEXING TERHADAP WAKTU EKSEKUSI QUERY SQL PADA BASIS DATA TRANSAKSI E-COMMERCE

M Aldy Zulfa Saputra, Muchammad Soufwan Fauzi, Rangga Dzikri Fardiansyah, Zaki Kafila Pamungkas, Dicky Anggriawan Nugroho, Imam Prayogo Pujiono

Abstract


This study examines the effect of indexing techniques on SQL query execution speed in a MySQL-based e-commerce transaction database. Performance issues often arise as data volume increases because the system must scan the entire table, resulting in slow response times. To analyze this problem, this study employed a pure experimental method by testing three index conditions: no index, a single index, and a composite index. Testing was conducted using a synthetic dataset of 20,000 rows depicting e-commerce transaction activity. Each condition was evaluated using a series of SELECT queries. Measurements were made through execution time and execution plans displayed by the EXPLAIN command. The results showed that using indexes provided a significant performance improvement. A single index successfully reduced execution time from 0.2380 seconds to 0.0740 seconds, while a composite index resulted in an execution time of 0.0900 seconds. Both types of indexes reduced the number of rows scanned across the entire table to only tens of rows. A single index is more suitable for simple queries with high selectivity, while a composite index is more effective for queries with more than one condition. However, implementing an index requires additional storage space and causes the data write process to run slightly slower. Overall, this study confirms that an indexing strategy tailored to query patterns and data characteristics can significantly improve the performance of e-commerce transaction databases.

Penelitian ini mengkaji pengaruh teknik indexing terhadap kecepatan eksekusi query SQL pada basis data transaksi e-commerce berbasis MySQL. Gangguan kinerja sering muncul ketika jumlah data meningkat karena sistem harus melakukan pemindaian seluruh tabel yang menyebabkan waktu respon menjadi lambat. Untuk menganalisis permasalahan tersebut, penelitian ini menerapkan metode eksperimen murni dengan menguji tiga kondisi indeks yaitu tanpa indeks, indeks tunggal, dan indeks komposit. Pengujian dilakukan menggunakan dataset sintetis berjumlah 20.000 baris yang menggambarkan aktivitas transaksi e-commerce. Setiap kondisi dievaluasi menggunakan serangkaian query SELECT. Pengukuran dilakukan melalui waktu eksekusi dan rencana eksekusi yang ditampilkan oleh perintah EXPLAIN. Hasil penelitian menunjukkan bahwa penggunaan indeks memberikan peningkatan performa yang sangat signifikan. Indeks tunggal berhasil menurunkan waktu eksekusi dari 0,2380 detik menjadi 0,0740 detik, sedangkan indeks komposit menghasilkan waktu eksekusi 0,0900 detik. Kedua jenis indeks ini mengurangi jumlah baris yang dipindai dari seluruh tabel menjadi hanya puluhan baris. Indeks tunggal lebih sesuai untuk query sederhana dengan selectivity yang tinggi, sedangkan indeks komposit lebih efektif untuk query yang memiliki lebih dari satu kondisi. Meskipun demikian, penerapan indeks memerlukan ruang penyimpanan tambahan dan menyebabkan proses penulisan data berjalan sedikit lebih lambat. Secara keseluruhan, penelitian ini menegaskan bahwa strategi indexing yang disesuaikan dengan pola query dan karakteristik data mampu meningkatkan performa basis data transaksi e-commerce secara signifikan


Full Text:

PDF

References


Adisa, Y., & Nasution, M. I. P. (2023). Konsep Dan Peran Sistem Manajemen Basis Data Relasional Pada Sistem Informasi Manajemen. Jurnal Manajemen Administrasi Bisnis Dan Publik Terapan, 1(3), 76–83. https://doi.org/https://doi.org/10.59061/masip.v1i3.314

Ahsana, S. H., Syahputra, M. B., Putri, A. F. F. M., & Prasetyo, A. A. (2023). Analisis Perbandingan Performa Antara Mysql Dan Postgresql. Prosiding Seminar Nasional Teknologi Dan Sistem Informasi (SITASI), 6–7. https://repository.upnjatim.ac.id/28497/

Anchlia, A. (2024). Enhancing Query Performance Through Relational Database Indexing. International Journal of Computer Trends and Technology, 72(8), 130–133. https://doi.org/10.14445/22312803/IJCTT-V72I8P119

Ibna, A. Z. (2024). Implikasi Penggunaan Basis Data dalam Big Data. Jurnal Sains Student Research, 2(4), 255–265. https://doi.org/https://doi.org/10.61722/jssr.v2i4.1995

Maesaroh, S., Gunawan, H., Lestari, A., & Sufyan, M. (2022). Query Optimization in MySQL Database Using Index. International Journal of Cyber and IT Service Management (IJCITSM), 2(2), 104–110. https://doi.org/10.34306/ijcitsm.v2i2.84

Nurhayati, S. T., & Nasution, M. I. P. (2023). Database Management System Pada Perusahaan. Jurnal Akuntansi Keuangan Dan Bisnis, 1(2), 62–64. https://jurnal.ittc.web.id/index.php/jakbs/article/view/43

Pamungkas, R. (2018). Optimalisasi Query Dalam Basis Data My Sql Menggunakan Index. Journal of Computer, Information System, & Technology Management, 1(2), 27–31. https://doi.org/10.25273/research.v1i1.2453

Panggabean, S., & Azizah, E. S. N. (2025). Evaluasi Kinerja Sistem Basis Data Relasional pada Aplikasi E-Commerce Menggunakan Algoritma Indexing. Pustaka Data : Pusat Akses Kajian Database, Analisa Teknologi, Dan Arsitektur Komputer, 5(1), 70–76. https://doi.org/10.55382/jurnalpustakadata.v5i1.998

Permana, K. E., Sophan, M. K., Muntasa, A., & Rahmat, A. B. (2023). Perbandingan Kinerja Query Sql Join Tables dengan Menggunakan Index. Jurnal Simantec, 11(2), 241–248. https://doi.org/10.21107/simantec.v11i2.20288

Poggi, N., Carrera, D., Gavalda, R., Avyguade, E., & Torres, J. (2014). A Methodology for The Evaluation of High Response Time on E-Commerce Users and Sales. Information Systems Frontiers, 16(5), 867–885. https://doi.org/10.1007/s10796-012-9387-4

Rahayu, S., Halawa, H. W., Abdillah, A. F., & Mujayanah, A. (2025). Pemanfaatan Big Data Analytics untuk Analisis Pola Perilaku Konsumen E-Commerce Strategis. JUTECH: Journal Education and Technology, 6(1), 64–73. https://doi.org/10.31932/jutech.v6i1.4834

Sakshi, S., & Sharma, A. (2025). Relational Database Performance Optimization Techniques. International Conference on Recent Advancements and Modernisations in Sustainable Intelligent Technologies and Applications (RAMSITA). https://doi.org/10.2991/978-94-6463-716-8_10

Šušter, I., & Ranisavljević, T. (2023). Optimization of Mysql Database. Journal of Process Management and New Technologies, 11(1), 141–151. https://doi.org/10.5937/jouproman2301141Q

Taipalus, T. (2024). Database management system performance comparisons: A systematic literature review. Journal of Systems and Software, 208, 111872. https://doi.org/10.1016/j.jss.2023.111872

Thoib, I., Candra, B. P., Sururi, N., & Nugraha, D. S. (2024). Perbandingan Performa Pencarian Data Berbasis Teks dengan Dan Tanpa Full-text Index pada Basis Data MySQL. Jurnal Sains Dan Teknologi, 3(6), 663–673. https://doi.org/10.55123/insologi.v3i6.4596




DOI: https://doi.org/10.56486/jeis.vol6no2.1076

Article Metrics

Abstract view : 4 times
PDF - 3 times

Refbacks

  • There are currently no refbacks.


Copyright (c) 2026 Aldy Zulfa

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

TERINDEKS OLEH :