Adaptive Machine Learning-Driven Query Optimization in Oracle Databases

Adaptive Machine Learning-Driven Query Optimization in Oracle Databases

Mohammad Navid Heidari1

1) Department of Computer Engineering, Islamic Azad University, Najafabad Branch, Isfahan, Iran Email:

IOI Code : AAHD-ABZAEK
Publication : National Conference on Information Technology, Nanotechnology, Artificial Intelligence and Technological Futures Studies(itnaf.ir)
Abstract :
    Traditional cost-based query optimizers in Oracle databases rely on periodically refreshed statistics and hand-crafted heuristics. Although this approach has been refined over decades, it can still produce suboptimal execution plans when confronted with dynamic workloads, skewed data distributions, or complex analytical queries. Under these conditions, even moderate errors in cardinality estimation can cascade into poor join orders, suboptimal access paths, and excessive resource consumption .This paper proposes an adaptive, machine learning–driven query optimization framework that augments Oracle’s native optimizer with predictive modeling and reinforcement learning components. The framework continuously observes query executions, learns from performance feedback, and incorporates this knowledge into refined cardinality estimates, index selection strategies, and plan recommendations. A learning agent is integrated into the optimization workflow to form a hybrid “learning-augmented” optimizer: the agent monitors workload patterns and performance metrics, then proposes plan adjustments or index changes that are evaluated by the optimizer before execution. Experimental evaluation on benchmark-style workloads, including TPC-H–like decision-support queries and mixed OLTP/OLAP scenarios in an Oracle 19c environment, shows that the learning-augmented optimizer can reduce average query latency by approximately 20–25% and improve throughput by up to 30% compared to the traditional cost-based optimizer. It also achieves more robust behavior as data and workload characteristics evolve, with noticeably lower plan cost estimation errors. These results indicate that practical machine learning and reinforcement learning techniques can effectively enhance Oracle query optimization and support the long-term goal of self-tuning, workload-aware database systems.

Keywords : query optimization oracle database machine learning reinforcement learning adaptive indexing self tuning databases