Adaptive MySQL Index Optimization based on Decision Trees and Random Forests

Online adjustment of MySQL indexes often lags behind traffic changes; the response time for DBAs to manually add indexes is lengthy, and static configurations cannot automatically shrink when workload declines. Curiously, when looking at the literature on this topic, most studies zero in on query latency and little else. Lock-waiting—which, in our experience, is often what actually brings a production system to its knees—gets barely a mention. And what makes matters worse, many of these proposals are so heavyweight in terms of model complexity that they become impractical to deploy in a real MySQL environment. This paper introduces three categories of features—query execution frequency, task wait time, and query latency—and trains recommendation models using decision trees and random forests respectively. We train decision‑tree and random‑forest models, rank columns by feature importance, and apply a Cardinality‑based post‑filter to discard low‑selectivity candidates. Experiments on one million synthetic records show that the decision‑tree scheme reduces query latency by 83.5%, while the random‑forest scheme achieves 87.5%. The traditional empirical index on username, owing to its high selectivity, achieves a 99.2% improvement—better than the machine‑learning solutions. However, the machine‑learning schemes use slightly less storage (107.70 MB vs. 116.72 MB for the empirical index) and offer the advantage of automation. Independent‑samples t‑tests reveal a significant difference between decision trees and random forests (t = 2.625, p = 0.0178), and between random forests and the empirical baseline (p < 0.001). The proposed solution interacts with MySQL 8.0 through standard SQL interfaces, requires no kernel modification, and provides a viable path for automated index tuning in specific scenarios.

Authors

Institutions

Publication Details

Journal
Frontiers in Computing and Intelligent Systems
Published
2026-11-29
DOI
https://doi.org/10.54097/6wn22s76
Primary Topic
Advanced Database Systems and Queries
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

Adaptive MySQL Index Optimization based on Decision Trees and Random Forests

Qi Cui
Frontiers in Computing and Intelligent Systems
Advanced Database Systems and Queries
article

Adaptive MySQL Index Optimization based on Decision Trees and Random Forests

Qi Cui
article en

Abstract

Online adjustment of MySQL indexes often lags behind traffic changes; the response time for DBAs to manually add indexes is lengthy, and static configurations cannot automatically shrink when workload declines. Curiously, when looking at the literature on this topic, most studies zero in on query latency and little else. Lock-waiting—which, in our experience, is often what actually brings a production system to its knees—gets barely a mention. And what makes matters worse, many of these proposals are so heavyweight in terms of model complexity that they become impractical to deploy in a real MySQL environment. This paper introduces three categories of features—query execution frequency, task wait time, and query latency—and trains recommendation models using decision trees and random forests respectively. We train decision‑tree and random‑forest models, rank columns by feature importance, and apply a Cardinality‑based post‑filter to discard low‑selectivity candidates. Experiments on one million synthetic records show that the decision‑tree scheme reduces query latency by 83.5%, while the random‑forest scheme achieves 87.5%. The traditional empirical index on username, owing to its high selectivity, achieves a 99.2% improvement—better than the machine‑learning solutions. However, the machine‑learning schemes use slightly less storage (107.70 MB vs. 116.72 MB for the empirical index) and offer the advantage of automation. Independent‑samples t‑tests reveal a significant difference between decision trees and random forests (t = 2.625, p = 0.0178), and between random forests and the empirical baseline (p < 0.001). The proposed solution interacts with MySQL 8.0 through standard SQL interfaces, requires no kernel modification, and provides a viable path for automated index tuning in specific scenarios.

Frontiers in Computing and Intelligent SystemsVol. 19(1)
Jiangsu University (CN), Jiangsu University Jingjiang College (CN)
Advanced Database Systems and Queries
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon