SQL Query Optimization Through AI Agents
Year: 2026
Type: conference-paper
Abstract: Query optimization is crucial for modern data-driven applications and decision support systems to achieve accurate and timely results. SQL (Structured Query Language) still represents the primary user interface for relational databases; however, due to growing data volume, highly complex workloads, and hardware capacity expansion, traditional rule-based and cost-based query optimizers cannot handle these dynamic environments, as they are reliant upon fixed heuristics and pre-computed statistics that cannot adapt to real-time conditions. Therefore leading to a degradation in performance over time. This paper present an AI Agent-based hybrid framework to autonomously analyze SQL queries, estimate plans using closed-loop feedback mechanisms, including reinforcement learning (RL) and a genetic algorithm (GA). The framework has been implemented against PostgreSQL using a real world retail transactional dataset from Kaggle. Through rigorous experimentation, the results reveal that both GA and RL reducers outperform the built-in database optimizer, particularly for larger sets of complex multi-join and aggregation statements than most traditional query optimization tools/approaches can handle in an enterprise resource consumption when using this intelligent, self-learning system.
Authors: Kaivalya Thelaboyani, N. Siva Kumar
Institution: Hindustan Institute of Technology and Science
Language: English
Subfield: Information Systems
Field: Computer Science
Domain: Physical Sciences
Open Access status: hybrid
OpenAlex ID: W7221549657
