The Unreasonable Effectiveness of LLMs for Query Optimization
On the map: LLM reasoning → Knowledge- and tool-augmented reasoning
Abstract (arXiv)
Recent work in database query optimization has used complex machine learning strategies, such as customized reinforcement learning schemes. Surprisingly, we show that LLM embeddings of query text contain useful semantic information for query optimization. Specifically, we show that a simple binary classifier deciding between alternative query plans, trained only on a small number of labeled embedded query vectors, can outperform existing heuristic systems. Although we only present some preliminary results, an LLM-powered query optimizer could provide significant benefits, both in terms of performance and simplicity.
Key facts. Cited by 4 papers in the map (data through 7 Oct 2026). Placed in Knowledge- and tool-augmented reasoning, one of 17 directions in LLM reasoning. Builds on 8 of its 17 references that are in the map. First posted on arXiv 5 Nov 2024.
Builds on
8 of 17 references.
References · 8
- 2022GPTQ: Accurate Post-Training Quantization for Generative Pre-trained Transformerscited by 1,838
- 2022SmoothQuant: Accurate and Efficient Post-Training Quantization for Large Language Modelscited by 1,338
- 2023AWQ: Activation-aware Weight Quantization for LLM Compression and Accelerationcited by 1,234
- 2022MTEB: Massive Text Embedding Benchmarkcited by 623
- 2018Learned Cardinalities: Estimating Correlated Joins with Deep Learningcited by 64
- 2020Bao: Learning to Steer Query Optimizerscited by 62
- 2021Flow-Loss: Learning Cardinality Estimates That Mattercited by 22
- 2022Zero-Shot Cost Models for Distributed Stream Processingcited by 4
Built on by
Citing papers per year: 2025: 4.
4 papers.
- 2025LLM-Symbolic Integration for Robust Temporal Tabular Reasoningcited by 4
- 2025Training-Free Query Optimization via LLM-Based Plan Similaritycited by 0
- 2025LLM4Hint: Leveraging Large Language Models for Hint Recommendation in Offline Query Optimizationcited by 0
- 2025Bootstrapping Learned Cost Models with Synthetic SQL Queriescited by 0
- 2025Bootstrapping Learned Cost Models with Synthetic SQL Queries27 Aug 2025
- 2025LLM4Hint: Leveraging Large Language Models for Hint Recommendation in Offline Query Optimization4 Jul 2025
- 2025Training-Free Query Optimization via LLM-Based Plan Similarity6 Jun 2025
- 2025LLM-Symbolic Integration for Robust Temporal Tabular Reasoning6 Jun 2025
Similar, not cited
Close in wording, no citation either way
- 2025SEFRQO: A Self-Evolving Fine-Tuned RAG-Based Query Optimizer
- 2024A Survey of Query Optimization in Large Language Models
- 2026100x Cost & Latency Reduction: Performance Analysis of AI Query Approximation using Lightweight Proxy Models
- 2024LLM-PQA: LLM-enhanced Prediction Query Answering
- 2024LLM-Enhanced Data Management
- 2024From Natural Language to SQL: Review of LLM-based Text-to-SQL Systems
- 2025ExpandR: Teaching Dense Retrievers Beyond Queries with LLM Guidance
- 2025Rethinking On-policy Optimization for Query Augmentation