Aug 2026· Proceedings of the VLDB Endowment· Vol 19, pp. 4594-4597· 0 citations· 22 references
TL;DR
An LLM-based query tuning tool for Microsoft SQL Server that takes as input a query, tuning constraints such as minimum required improvement and time budget, and automatically recommends semantically equivalent query rewrites that improve the execution time of the query.
Abstract
Query rewriting is one of the techniques used by database developers and administrators to tune the performance of poorly performing SQL queries. We have developed an LLM-based query tuning tool for Microsoft SQL Server that takes as input a query, tuning constraints such as minimum required improvement and time budget, and automatically recommends semantically equivalent query rewrites that improve the execution time of the query. The software tool is incorporated as an extension to SQL Server Management Studio (SSMS). Our demonstration highlights two important capabilities. First, while LLMs have the ability to generate promising candidate rewrites for the given query, they cannot guarantee semantic equivalence of a query rewrite. We use a technique we developed for verifying semantic equivalence of two queries, which leverages the built-in capabilities of Microsoft SQL Server's query optimizer. Second, we judiciously use the given time budget by adopting an anytime tuning algorithm and employing optimizations that help short-circuit the expensive steps of verification and execution for each candidate rewrite. To the best of our knowledge this is the first tool of its kind that enables DBAs and application developers to safely operationalize LLM-based query rewriting.
The Domain-Oriented Tooling Pattern is proposed: instead of generating SQL at query time, the model selects from a small set of domain-aligned tools whose parameterized queries encapsulate schema navigation, joins and business rules on the server side.
Text-to-SQL models translate natural language questions into SQL, enabling non-technical users to access databases. However, most existing research focuses on correctness, neglecting query efficiency. In this paper, we address the challenge of evaluating the execution efficiency of generated SQL in Text-to-SQL by intro...
Li Lin, Yun-Feng Shen, Ling-Feng Bao et al.· Proceedings of the ACM on So...· 0 citations
SafeQL is proposed, a search-based refinement paradigm that redefines the role of the DBMS as an active guide in the refinement process, and significantly improves execution accuracy and efficiency compared to regeneration-based methods.
Geonho Lee, Min-Soo Kim· Proceedings of the VLDB Endo...· 0 citations
This work presents AutoSQL, a system that reconstructs SQL templates from Go ORM code that constructs a Code Index, a directed graph that captures structural dependencies between functions, types, and global variables as navigable edges and synthesizes SQL templates.
Jun-Song Pu, Yi-Chen Li, Zhuang-Bin Chen et al.· Proceedings of the 41st IEEE...· 0 citations
This paper revisits the connection between Datalog and relational databases, advocating recursive SQL as a backend for Datalog evaluation, and presents a compilation framework that translates Datalog programs, particularly those in the Linear Datalog fragment, into equivalent recursive SQL queries.
Amir Shaikhha, Anna Herlihy, Hung Q. Ngo· 0 citations
We use cookies to run the site and, with your consent, for analytics and to show ads.
See our Cookie Policy.