AIFeed

Verified LLM-Based Query Rewriting for Microsoft SQL Server

Original text(via HN AI)

Verified LLM-Based Query Rewriting for Microsoft SQL Server

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.


        @article{lee2026,
  title = {{Verified LLM-Based Query Rewriting for Microsoft SQL Server}},
  author = {Kukjin Lee and Anshuman Dutt and Vivek Narasayya and Surajit Chaudhuri},
  journal = {Proceedings of the VLDB Endowment},
  volume = {19},
  issue = {12},
  year = 2026,
  month = 8,
  day = 1,
  doi = {10.14778/3827998.3828074},
}
      

The text above was extracted automatically from the source page and may miss images, tables or code blocks. The original is authoritative.

Published by HN AI
This site only summarises and aggregates; copyright stays with the original author. Headlines and summaries follow the source — where they differ, the original wins.
Read the original ↗