Return
Verified LLM-Based Query Rewriting for Microsoft SQL Server
DOI:10.14778/3827998.3828074.png)
Abstract
En 中文
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.
Journal
P
IF:
3.3
Papers:
563
Citations:
1.2W
Organization
No organization information available

