mlsanityData to 14 Oct 2026

Are LLMs Overkill for Databases?: A Study on the Finiteness of SQL

arXiv 2603.25568 ↗First posted 26 Mar 2026cs.AI cs.CL cs.DBcited by 0

Not on the map. Why?

Abstract (arXiv)

Translating natural language to SQL for data retrieval has become more accessible thanks to code generation LLMs. But how hard is it to generate SQL code? While databases can become unbounded in complexity, the complexity of queries is bounded by real life utility and human needs. With a sample of 376 databases, we show that SQL queries, as translations of natural language questions are finite in practical complexity. There is no clear monotonic relationship between increases in database table count and increases in complexity of SQL queries. In their template forms, SQL queries follow a Power Law-like distribution of frequency where 70% of our tested queries can be covered with just 13% of all template types, indicating that the high majority of SQL queries are predictable. This suggests that while LLMs for code generation can be useful, in the domain of database access, they may be operating in a narrow, highly formulaic space where templates could be safer, cheaper, and auditable.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 7 of its 17 references that are in the map. First posted on arXiv 26 Mar 2026.

Builds on

7 of 17 references.

References · 7

  1. 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,139
  2. 2023Can LLM Already Serve as A Database Interface? A BIg Bench for Large-Scale Database Grounded Text-to-SQLscited by 688
  3. 2017Seq2SQL: Generating Structured Queries from Natural Language using Reinforcement Learningcited by 687
  4. 2023DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correctioncited by 477
  5. 2017SQLNet: Generating Structured Queries From Natural Language Without Reinforcement Learningcited by 135
  6. 2021KaggleDBQA: Realistic Evaluation of Text-to-SQL Parserscited by 106
  7. 2025Agent Bain vs. Agent McKinsey: A New Text-to-SQL Benchmark for the Business Domaincited by 4

Built on by

Not cited yet.