Cracking Query Bottlenecks: Towards Efficiency-Oriented Text-to-SQL Generation

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 introducing EESQLBench, a novel benchmark designed to assess both correctness and efficiency. EESQLBench pairs each natural language question with an expert-optimized SQL query, providing a reliable efficiency baseline. We evaluate six representative large language models (LLMs), including four open-source models (SQLCoder, CodeLlama, DeepSeek-Coder, and DeepSeek-R1) and two closed-source models (GPT-5.2 and Gemini-2.5-Pro), using cost-based metrics including Cost Reachability (CR) and Acceptable Reachability at kk (AR@kk). Our results reveal that current LLMs, despite achieving high correctness, struggle to produce efficient queries. We observe substantial efficiency gaps between models and emphasize that semantic correctness alone does not guarantee query efficiency. Furthermore, we provide insights into common inefficiency patterns in LLM-generated SQL queries, such as missing access pruning and inefficient subquery logic.

Link
https://www.semanticscholar.org/paper/aeb1732cf255fa6fe765374ed3da6b34a73985bc
Found by
Semantic Scholar
Authors
Li Lin, Yun-Feng Shen, Ling-Feng Bao, Rong-Xin Wu, Yang Liu
Categories
benchmark, evaluation
Published
2026-10-01
Last seen by the radar
2026-10-03
Citations
0
Influential citations
0
Radar score
35.50 / 100 (how it is scored)
Why it scored so
Matched: benchmark, evaluat; Primary record: Semantic Scholar
Related links
https://doi.org/10.1145/3832269
Is this record right? If you made this work and something here is wrong or missing, tell us what to fix.

More records found by Semantic Scholar