SLM-Augmented PostgreSQL Query Optimization

  • Authors

    • Kiran Reddy Sudini Director of Cloud Engineering & Operations, USA. Author

    DOI:

    https://doi.org/10.67228/30715628/ICIoTCAA-2026P105

    Published 08-31-2026

  • Small Language Models, PostgreSQL, Query Optimization, Database Performance, SQL Query Rewriting, Index Recommendation, Query Planner Optimization, AI-Augmented Databases, Healthcare Database Systems, Safe AI Deployment
  • Abstract

    Database performance is one of the few problems that never stays solved. As data grows and access patterns shift, queries that were fast become slow, indexes that were right become wrong, and the tuning work begins again. Traditionally this work is manual, expert-intensive, and reactive. I designed an SLM-augmented query optimization pipeline for our PostgreSQL estate a small language model deployed inside our own network that continuously analyzes query workload and recommends rewrites, indexes, and planner hints. This article describes the design, and more importantly, the safety architecture that makes AI in the database layer responsible rather than reckless in a regulated healthcare environment.

  • References

    [1] Kaoudi, Zoi, and Ioana Giurgiu. "Query Optimization Beyond Data Systems: The Case for Multi-Agent Systems." arXiv preprint arXiv:2512.11001 (2025).

    [2] Yan, Zhengtong, et al. "DBMS-LLM Integration Strategies in Industrial and Business Applications: Current Status and Future Challenges." arXiv preprint arXiv:2507.19254 (2025).

    [3] Qu, Ge, et al. "SHARE: An SLM-based hierarchical action CorREction assistant for text-to-SQL." Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). 2025.

    [4] Glenn, Parker, Alfy Samuel, and Daben Liu. "Play by the Type Rules: Inferring Constraints for LLM Functions in Declarative ProgrSingh, Sarvjeet, et al. "Query Selectivity Estimation for Uncertain Database." (2007).

    [5] Singh, Sarvjeet, et al. "Query Selectivity Estimation for Uncertain Database." (2007).ams." arXiv preprint arXiv:2509.20208 (2025).

    [6] Stonebraker, Michael, and Lawrence A. Rowe. "The design of Postgres." ACM Sigmod Record 15.2 (1986): 340-355.

    [7] Zhou, Feng, et al. "Nabil: A text-to-SQL model based on brain-inspired computing techniques and large language modeling." Electronics 14.19 (2025): 3910.

    [8] Sharma, Anantha, et al. "Mitigating hallucinationZeroG: An advanced knowledge management engine." 2025 International Conference on Artificial Intelligence, Computer, Data Sciences and Applications (ACDSA). IEEE, 2025.

    [9] Singh, Sarvjeet, et al. "Query Selectivity Estimation for Uncertain Database." (2007).

    [10] Platt, Nolan, and Pragyansmita Nayak. "Multi-Model Synthetic Training for Mission-Critical Small Language Models." 2025 3rd International Conference on Foundation and Large Language Models (FLLM). IEEE, 2025.

    [11] Sun, Wenbo, et al. "TranSQL+: Serving Large Language Models with SQL on Low-Resource Hardware." Proceedings of the ACM on Management of Data 3.6 (2025): 1-27.

    [12] Quoc Anh, Nguyen, et al. "Small Language Models For Efficient Domain Data Retrieval Using Structured Query Language from Natural Language." Nguyen and Gia Hy, Truong and Ha, Son, Small Language Models For Efficient Domain Data Retrieval Using Structured Query Language from Natural Language (December 09, 2025) (2025).

    [13] Shah, Sarvjeet Singh Chris Mayfield Rahul, and Sunil Prabhakar Susanne Hambrusch. "Query Selectivity Estimation for Uncertain Data." (2007).

    [14] Wang, Jing, et al. "Revisiting secondary indexing in {LSM-based} storage systems with persistent memory." 2023 USENIX Annual Technical Conference (USENIX ATC 23). 2023.

    [15] Caldeira, Carlos Eduardo, et al. "LLM-Based Text-to-SQL for SparkSQL Queries in Manufacturing Data Lakes: An Architecture for Industry 4.0." 2025 12th International Conference on Soft Computing & Machine Intelligence (ISCMI). IEEE, 2025.

    [16] Wang, Jing, et al. "Perseid: A secondary indexing mechanism for LSM-based storage systems." ACM Transactions on Storage 20.2 (2024): 1-28.

  • Downloads

Similar Articles

21-30 of 113

You may also start an advanced similarity search for this article.