SQLMind: A Large-Model–Driven Adaptive Query Optimization Framework for Cloud Databases
DOI:
https://doi.org/10.66238/fsrma81Keywords:
Large Language Models, Reinforcement Learning, Query Optimization, Cloud Databases, Automatic Indexing, SQL Rewrite, Performance TuningAbstract
Cloud database systems increasingly operate under highly dynamic workloads, heterogeneous data distributions, and rapidly evolving application requirements, which place substantial demands on the robustness and adaptability of query optimizers. Traditional rule-based or cost-model—driven optimizers often struggle to generalize across diverse execution environments, leading to suboptimal query plans and inefficient resource utilization. To address these challenges, this paper proposes SQLMind, a large-model—driven adaptive query optimization framework designed specifically for cloud database settings. SQLMind integrates four tightly coupled components: (1) a Large Language Model-based SQL Semantic Interpreter that understands complex SQL intent and contextual constraints, (2) a Query Rewriter that generates semantically equivalent but performance-enhanced SQL variants, (3) an Index and Candidate Plan Generator that synthesizes structural optimization opportunities, and (4) a Reinforcement-Learning-based Plan Selector that continuously improves execution-plan decisions based on real runtime feedback. This unified architecture enables SQLMind to combine natural-language reasoning, structural SQL transformation, and data-driven plan optimization, forming a self-evolving query optimization pipeline. Experiments conducted on a cloud-native workload dataset demonstrate that SQLMind delivers substantial performance gains over both PostgreSQL’s default optimizer and strong learning-based baselines. The framework achieves a 38.6% reduction in query latency, 84.1% plan-selection accuracy, and a 27.3% improvement in throughput, while maintaining a near-zero invalid rewrite rate. These results confirm that combining large-model semantic reasoning with reinforcement-learning-based plan optimization yields consistently superior adaptive query performance in cloud database environments.
References
[1] Selinger P G, Astrahan M M, Chamberlin D D, et al. Access path selection in a relational database management system[C]//Proceedings of the 1979 ACM SIGMOD international conference on Management of data. 1979: 23-34.
[2] Graefe G, McKenna W. The Volcano optimizer generator[R]. 1991.
[3] Poosala V, Ioannidis Y E. Selectivity estimation without the attribute value independence assumption[C]//VLDB. 1997, 97: 486-495.
[4] Armenatzoglou N, Basu S, Bhanoori N, et al. Amazon Redshift re-invented[C]//Proceedings of the 2022 International Conference on Management of Data. 2022: 2205-2217.
[5] Corbett J C, Dean J, Epstein M, et al. Spanner: Google’s globally distributed database[J]. ACM Transactions on Computer Systems (TOCS), 2013, 31(3): 1-22.
[6] Kraska T, Beutel A, Chi E H, et al. The case for learned index structures[C]//Proceedings of the 2018 international conference on management of data. 2018: 489-504.
[7] Hilprecht B, Schmidt A, Kulessa M, et al. Deepdb: Learn from data, not from queries![J]. arXiv preprint arXiv:1909.00607, 2019.
[8] Krishnan S, Yang Z, Goldberg K, et al. Learning to optimize join queries with deep reinforcement learning[J]. arXiv preprint arXiv:1808.03196, 2018.
[9] Marcus R, Negi P, Mao H, et al. Bao: Learning to steer query optimizers[J]. arXiv preprint arXiv:2004.03814, 2020.
[10] Li G, Zhou X, Li S, et al. Qtune: A query-aware database tuning system with deep reinforcement learning[J]. Proceedings of the VLDB Endowment, 2019, 12(12): 2118-2130.
[11] Ning Z, Zeng H, Tian Z. Research on data-driven energy efficiency optimisation algorithm for air compressors[C]//Third International Conference on Advanced Materials and Equipment Manufacturing (AMEM 2024). SPIE, 2025, 13691: 1068-1075.
[12] Yu T, Yasunaga M, Yang K, et al. RAT-SQL: relation-aware schema encoding for text-to-SQL parsers[C]//Proceeding of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP 2020), Online. 2020.
[13] Pourreza M, Rafiei D. Din-sql: Decomposed in-context learning of text-to-sql with self-correction[J]. Advances in neural information processing systems, 2023, 36: 36339-36348.
[14] Wei H, Wu Y, Li M. RAGN-IIoT: A Retrieval-Augmented NL2SQL Framework with Dynamic Sensor-Selection Guardrails for Industrial IoT Time-Series Data Warehouses[J]. Journal of Computer, Signal, and System Research, 2025, 2(7): 78-88.
[15] Lin, Ziyu, and Biliang Wang. "Adaptive load balancing algorithms for cloud computing distributed systems." IET Conference Proceedings CP952. Vol. 2025. No. 39. Stevenage, UK: The Institution of Engineering and Technology, 2025.
[16] Sun Q, Zhao X, Lin X. Design of a Hardware-Software Co-designed Real-Time Machine Learning System for Big Data Streams[C]//Proceedings of the 2nd International Symposium on Integrated Circuit Design and Integrated Systems. 2025: 265-271.
[17] Liang Z, Wei W, Zhang K, et al. Research on multi-hop inference optimization of llm based on mquake framework[J]. arXiv preprint arXiv:2509.04770, 2025.
[18] Yao Y, Zhang W, Li M. Cloud-Edge Federated Incremental Learning Framework for PMSM Efficiency Optimization with Lightweight CNN-LSTM Models and OTA Differential Deployment[J]. Journal of Computer Science and Frontier Technologies, 2026, 3(1): 98-111.
[19] Li J, Zeng P, Luo P. CANAO: A Cloud-Aware Native Agentic AI Framework for Adaptive Task Orchestration in Cloud-Native Environments[J]. Frontiers in Artificial Intelligence Research, 2026, 3(1): 187-198.
Toor, M. J., Shabbir, S., Rauf, A., Nisar, A., Safdar, S., & Zaib-Un-Nisa. (n.d.). The role of structured-communication-technique in developing pragmatic language capability among ASD-children. https://doi.org/10.63878/cjssr.v3i2.785
Toor, M. J., Mehmood, H., Yasmeen, A., Honey, Q., Waseem, M., & Wasif, M. (n.d.). Exploring the effect of verbal encouraging phrases (VEP) on Chinese language learners’ academic achievement at university level.
Toor, M. J., Arafat, M., Ayoub, M., Ali, M., & Alessi Longa, F. E. (n.d.). From coherent self to fragmented persona: Digital identity fragmentation and academic self-concept among Generation Z, with comparative insights from Generation Alpha. https://doi.org/10.63878/cjssr.v4i2.2318
Katsitadze, N., Kharadze, N., & Pirtskhalaishvili, D. (2025). The impact of social media on students’ effective time management. Baltic Journal of Economic Studies, 11(1), 200–210. https://doi.org/10.30525/2256-0742/2025-11-1-200-210
Toor, M. J., Zafar, S., Omer, F., Sarwar, M., & Hussain, A. K. (n.d.). Teachers’ perspectives on effectiveness of translanguaging in enhancing English language learning at secondary school level.
Downloads
Published
Issue
Section
License
Copyright (c) 2026 Yi Yang, Ziyi Ye, Kaijie Zhang

This work is licensed under a Creative Commons Attribution 4.0 International License.
License Terms (Recommended – CC BY 4.0)
All articles published in Fundamental Scientific Reports in Multidisciplinary Areas are licensed under the Creative Commons Attribution 4.0 International License (CC BY 4.0).
This license permits unrestricted use, distribution, and reproduction in any medium, provided the original author(s) and source are properly cited. Users are allowed to copy, redistribute, remix, transform, and build upon the material for any purpose, including commercial use, as long as appropriate credit is given.
Authors retain copyright of their work while granting the journal the right of first publication. The journal provides immediate open access to its content on the principle that making research freely available supports a greater global exchange of knowledge.
For more information about this license, visit:
https://creativecommons.org/licenses/by/4.0/