Balsa: Learning a Query Optimizer Without Expert Demonstrations
Not on the map. Why?
Abstract (arXiv)
Query optimizers are a performance-critical component in every database system. Due to their complexity, optimizers take experts months to write and years to refine. In this work, we demonstrate for the first time that learning to optimize queries without learning from an expert optimizer is both possible and efficient. We present Balsa, a query optimizer built by deep reinforcement learning. Balsa first learns basic knowledge from a simple, environment-agnostic simulator, followed by safe learning in real execution. On the Join Order Benchmark, Balsa matches the performance of two expert query optimizers, both open-source and commercial, with two hours of learning, and outperforms them by up to 2.8× in workload runtime after a few more hours. Balsa thus opens the possibility of automatically learning to optimize in future compute environments where expert-designed optimizers do not exist.
Key facts. Cited by 18 papers in the map (data through 7 Oct 2026). Builds on 17 of its 39 references that are in the map. First posted on arXiv 5 Jan 2022.
Builds on
17 of 39 references.
References · 17
- 2017Attention Is All You Needcited by 59,932
- 2017Domain Randomization for Transferring Deep Neural Networks from Simulation to the Real Worldcited by 1,401
- 2019Mastering Atari, Go, Chess and Shogi by Planning with a Learned Modelcited by 1,327
- 2019Solving Rubik's Cube with a Robot Handcited by 699
- 2017Ray: A Distributed Framework for Emerging AI Applicationscited by 516
- 2020Generative Language Modeling for Automated Theorem Provingcited by 379
- 2017Thinking Fast and Slow with Deep Learning and Tree Searchcited by 245
- 2019Neo: A Learned Query Optimizercited by 80
- 2018Learned Cardinalities: Estimating Correlated Joins with Deep Learningcited by 64
- 2020Bao: Learning to Steer Query Optimizerscited by 62
- 2019An End-to-End Learning-based Cost Estimatorcited by 43
- 2019Deep Unsupervised Cardinality Estimationcited by 36
5 more
- 2018Learning to Optimize Join Queries With Deep Reinforcement Learningcited by 32
- 2020NeuroCard: One Cardinality Estimator for All Tablescited by 21
- 2020Are We Ready For Learned Cardinality Estimation?cited by 19
- 2019SkinnerDB: Regret-Bounded Query Evaluation via Reinforcement Learningcited by 17
- 2020Towards Scalable Dataframe Systemscited by 17
Built on by
Citing papers per year: 2023: 4; 2024: 5; 2025: 6; 2026: 3.
18 papers.
Sort:
By area:
- 2025Barbarians at the Gate: How AI is Upending Systems Researchcited by 48
- 2023Lero: A Learning-to-Rank Query Optimizercited by 26
- 2024E2ETune: End-to-End Knob Tuning via Fine-tuned Generative Language Modelcited by 9
- 2024NeurDB: An AI-powered Autonomous Data Systemcited by 5
- 2024CardBench: A Benchmark for Learned Cardinality Estimation in Relational Databasescited by 4
- 2023Kepler: Robust Learning for Faster Parametric Query Optimizationcited by 3
- 2025Let the Barbarians In: How AI Can Accelerate Systems Performance Researchcited by 2
- 2023JoinGym: An Efficient Query Optimization Environment for Reinforcement Learningcited by 1
- 2023FOSS: A Self-Learned Doctor for Query Optimizercited by 1
- 2024Hype or Heuristic? Quantum Reinforcement Learning for Join Order Optimisationcited by 1
- 2024GenJoin: Conditional Generative Plan-to-Plan Query Optimizer that Learns from Subplan Hintscited by 1
- 2025Large Scale Multi-Task Bayesian Optimization with Large Language Modelscited by 1
6 more
- 2025Low Rank Learning for Offline Query Optimizationcited by 0
- 2025LLM4Hint: Leveraging Large Language Models for Hint Recommendation in Offline Query Optimizationcited by 0
- 2025TiCard: Deployable EXPLAIN-only Residual Learning for Cardinality Estimationcited by 0
- 2026MICRO: A Lightweight Middleware for Optimizing Cross-store Cross-model Graph-Relation Joins [Technical Report]cited by 0
- 2026RELOAD: A Robust and Efficient Learned Query Optimizer for Database Systemscited by 0
- 2026Agentic Cost-Aware Query Planning with Knowledge Distillation for Big Data Analyticscited by 0
- 2026Agentic Cost-Aware Query Planning with Knowledge Distillation for Big Data Analytics18 May 2026
- 2026RELOAD: A Robust and Efficient Learned Query Optimizer for Database Systems16 Apr 2026
- 2026MICRO: A Lightweight Middleware for Optimizing Cross-store Cross-model Graph-Relation Joins [Technical Report]14 Mar 2026
- 2025Let the Barbarians In: How AI Can Accelerate Systems Performance Research16 Dec 2025
- 2025TiCard: Deployable EXPLAIN-only Residual Learning for Cardinality Estimation16 Dec 2025
- 2025Barbarians at the Gate: How AI is Upending Systems Research7 Oct 2025
- 2025LLM4Hint: Leveraging Large Language Models for Hint Recommendation in Offline Query Optimization4 Jul 2025
- 2025Low Rank Learning for Offline Query Optimization8 Apr 2025
- 2025Large Scale Multi-Task Bayesian Optimization with Large Language Models11 Mar 2025
- 2024GenJoin: Conditional Generative Plan-to-Plan Query Optimizer that Learns from Subplan Hints7 Nov 2024
- 2024CardBench: A Benchmark for Learned Cardinality Estimation in Relational Databases28 Aug 2024
- 2024Hype or Heuristic? Quantum Reinforcement Learning for Join Order Optimisation13 May 2024
6 more
- 2024NeurDB: An AI-powered Autonomous Data System7 May 2024
- 2024E2ETune: End-to-End Knob Tuning via Fine-tuned Generative Language Model17 Apr 2024
- 2023FOSS: A Self-Learned Doctor for Query Optimizer11 Dec 2023
- 2023JoinGym: An Efficient Query Optimization Environment for Reinforcement Learning21 Jul 2023
- 2023Kepler: Robust Learning for Faster Parametric Query Optimization11 Jun 2023
- 2023Lero: A Learning-to-Rank Query Optimizer14 Feb 2023
- 2025Barbarians at the Gate: How AI is Upending Systems Researchcited by 48
- 2023Lero: A Learning-to-Rank Query Optimizercited by 26
- 2024E2ETune: End-to-End Knob Tuning via Fine-tuned Generative Language Modelcited by 9
- 2024NeurDB: An AI-powered Autonomous Data Systemcited by 5
- 2024CardBench: A Benchmark for Learned Cardinality Estimation in Relational Databasescited by 4
- 2023Kepler: Robust Learning for Faster Parametric Query Optimizationcited by 3
- 2025Let the Barbarians In: How AI Can Accelerate Systems Performance Researchcited by 2
- 2023JoinGym: An Efficient Query Optimization Environment for Reinforcement Learningcited by 1
- 2023FOSS: A Self-Learned Doctor for Query Optimizercited by 1
- 2024Hype or Heuristic? Quantum Reinforcement Learning for Join Order Optimisationcited by 1
- 2024GenJoin: Conditional Generative Plan-to-Plan Query Optimizer that Learns from Subplan Hintscited by 1
- 2025Large Scale Multi-Task Bayesian Optimization with Large Language Modelscited by 1
12 most cited of 17 All 17 (JSON)
- 2026RELOAD: A Robust and Efficient Learned Query Optimizer for Database Systems16 Apr 2026
- 2026MICRO: A Lightweight Middleware for Optimizing Cross-store Cross-model Graph-Relation Joins [Technical Report]14 Mar 2026
- 2025Let the Barbarians In: How AI Can Accelerate Systems Performance Research16 Dec 2025
- 2025TiCard: Deployable EXPLAIN-only Residual Learning for Cardinality Estimation16 Dec 2025
- 2025Barbarians at the Gate: How AI is Upending Systems Research7 Oct 2025
- 2025LLM4Hint: Leveraging Large Language Models for Hint Recommendation in Offline Query Optimization4 Jul 2025
- 2025Low Rank Learning for Offline Query Optimization8 Apr 2025
- 2025Large Scale Multi-Task Bayesian Optimization with Large Language Models11 Mar 2025
- 2024GenJoin: Conditional Generative Plan-to-Plan Query Optimizer that Learns from Subplan Hints7 Nov 2024
- 2024CardBench: A Benchmark for Learned Cardinality Estimation in Relational Databases28 Aug 2024
- 2024Hype or Heuristic? Quantum Reinforcement Learning for Join Order Optimisation13 May 2024
- 2024NeurDB: An AI-powered Autonomous Data System7 May 2024
12 newest of 17 All 17 (JSON)