Learning to Optimize Join Queries With Deep Reinforcement Learning
Not on the map. Why?
Abstract (arXiv)
Exhaustive enumeration of all possible join orders is often avoided, and most optimizers leverage heuristics to prune the search space. The design and implementation of heuristics are well-understood when the cost model is roughly linear, and we find that these heuristics can be significantly suboptimal when there are non-linearities in cost. Ideally, instead of a fixed heuristic, we would want a strategy to guide the search space in a more data-driven way---tailoring the search to a specific dataset and query workload. Recognizing the link between classical Dynamic Programming enumeration methods and recent results in Reinforcement Learning (RL), we propose a new method for learning optimized join search strategies. We present our RL-based DQ optimizer, which currently optimizes select-project-join blocks. We implement three versions of DQ to illustrate the ease of integration into existing DBMSes: (1) A version built on top of Apache Calcite, (2) a version integrated into PostgreSQL, and (3) a version integrated into SparkSQL. Our extensive evaluation shows that DQ achieves plans with optimization costs and query execution times competitive with the native query optimizer in each system, but can execute significantly faster after learning (often by orders of magnitude).
Key facts. Cited by 32 papers in the map (data through 7 Oct 2026). First posted on arXiv 9 Aug 2018.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2021: 7; 2022: 9; 2023: 8; 2024: 4; 2025: 3; 2026: 1.
32 papers.
Sort:
By area:
- 2021A Provably Efficient Algorithm for Linear Markov Decision Process with Low Switching Costcited by 38
- 2022Sample-Efficient Reinforcement Learning with loglog(T) Switching Costcited by 32
- 2023Lero: A Learning-to-Rank Query Optimizercited by 26
- 2021DB-BERT: a Database Tuning Tool that "Reads the Manual"cited by 19
- 2022Balsa: Learning a Query Optimizer Without Expert Demonstrationscited by 18
- 2022Zero-Shot Cost Models for Out-of-the-box Learned Cost Predictioncited by 16
- 2021A Survey on Advancing the DBMS Query Optimizer: Cardinality Estimation, Cost Model, and Plan Enumerationcited by 14
- 2022Near-Optimal Regret Bounds for Multi-batch Reinforcement Learningcited by 13
- 2021A Survey on Deep Reinforcement Learning for Data Processing and Analyticscited by 10
- 2021One Model to Rule them All: Towards Zero-Shot Learning for Databasescited by 9
- 2021CARMI: A Cache-Aware Learned Index with a Cost-based Construction Algorithmcited by 8
- 2024The Central Role of the Loss Function in Reinforcement Learningcited by 8
20 more
- 2024Gap-Dependent Bounds for Q-Learning using Reference-Advantage Decompositioncited by 8
- 2022Learning to Improve Code Efficiencycited by 4
- 2023Near-Optimal Adversarial Reinforcement Learning with Switching Costscited by 4
- 2023A Unified and Efficient Coordinating Framework for Autonomous DBMS Tuningcited by 4
- 2025Gap-Dependent Bounds for Federated Q-learningcited by 4
- 2023Kepler: Robust Learning for Faster Parametric Query Optimizationcited by 3
- 2023InTune: Reinforcement Learning-based Data Pipeline Optimization for Deep Recommendation Modelscited by 3
- 2022Demystifying Reinforcement Learning in Time-Varying Systemscited by 2
- 2022Deploying a Steered Query Optimizer in Production at Microsoftcited by 2
- 2022Learned-Database Systems Securitycited by 2
- 2021A Pluggable Learned Index Method via Sampling and Gap Insertioncited by 1
- 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
- 2022Multi-agent Databases via Independent Learningcited by 0
- 2023CrystalBox: Future-Based Explanations for Input-Driven Deep RL Systemscited by 0
- 2025Breaking the log(1/Delta2) Barrier: Better Batched Best Arm Identification with Adaptive Gridscited by 0
- 2025Low Rank Learning for Offline Query Optimizationcited by 0
- 2026RELOAD: A Robust and Efficient Learned Query Optimizer for Database Systemscited by 0
- 2026RELOAD: A Robust and Efficient Learned Query Optimizer for Database Systems16 Apr 2026
- 2025Low Rank Learning for Offline Query Optimization8 Apr 2025
- 2025Gap-Dependent Bounds for Federated Q-learning5 Feb 2025
- 2025Breaking the log(1/Delta2) Barrier: Better Batched Best Arm Identification with Adaptive Grids29 Jan 2025
- 2024GenJoin: Conditional Generative Plan-to-Plan Query Optimizer that Learns from Subplan Hints7 Nov 2024
- 2024Gap-Dependent Bounds for Q-Learning using Reference-Advantage Decomposition10 Oct 2024
- 2024The Central Role of the Loss Function in Reinforcement Learning19 Sep 2024
- 2024Hype or Heuristic? Quantum Reinforcement Learning for Join Order Optimisation13 May 2024
- 2023FOSS: A Self-Learned Doctor for Query Optimizer11 Dec 2023
- 2023InTune: Reinforcement Learning-based Data Pipeline Optimization for Deep Recommendation Models13 Aug 2023
- 2023JoinGym: An Efficient Query Optimization Environment for Reinforcement Learning21 Jul 2023
- 2023Kepler: Robust Learning for Faster Parametric Query Optimization11 Jun 2023
20 more
- 2023A Unified and Efficient Coordinating Framework for Autonomous DBMS Tuning10 Mar 2023
- 2023CrystalBox: Future-Based Explanations for Input-Driven Deep RL Systems27 Feb 2023
- 2023Lero: A Learning-to-Rank Query Optimizer14 Feb 2023
- 2023Near-Optimal Adversarial Reinforcement Learning with Switching Costs8 Feb 2023
- 2022Learned-Database Systems Security20 Dec 2022
- 2022Deploying a Steered Query Optimizer in Production at Microsoft24 Oct 2022
- 2022Near-Optimal Regret Bounds for Multi-batch Reinforcement Learning15 Oct 2022
- 2022Learning to Improve Code Efficiency9 Aug 2022
- 2022Multi-agent Databases via Independent Learning28 May 2022
- 2022Sample-Efficient Reinforcement Learning with loglog(T) Switching Cost13 Feb 2022
- 2022Demystifying Reinforcement Learning in Time-Varying Systems14 Jan 2022
- 2022Balsa: Learning a Query Optimizer Without Expert Demonstrations5 Jan 2022
- 2022Zero-Shot Cost Models for Out-of-the-box Learned Cost Prediction3 Jan 2022
- 2021DB-BERT: a Database Tuning Tool that "Reads the Manual"21 Dec 2021
- 2021A Survey on Deep Reinforcement Learning for Data Processing and Analytics10 Aug 2021
- 2021One Model to Rule them All: Towards Zero-Shot Learning for Databases3 May 2021
- 2021CARMI: A Cache-Aware Learned Index with a Cost-based Construction Algorithm1 Mar 2021
- 2021A Survey on Advancing the DBMS Query Optimizer: Cardinality Estimation, Cost Model, and Plan Enumeration5 Jan 2021
- 2021A Pluggable Learned Index Method via Sampling and Gap Insertion4 Jan 2021
- 2021A Provably Efficient Algorithm for Linear Markov Decision Process with Low Switching Cost2 Jan 2021
- 2021A Provably Efficient Algorithm for Linear Markov Decision Process with Low Switching Costcited by 38
- 2022Sample-Efficient Reinforcement Learning with loglog(T) Switching Costcited by 32
- 2023Lero: A Learning-to-Rank Query Optimizercited by 26
- 2021DB-BERT: a Database Tuning Tool that "Reads the Manual"cited by 19
- 2022Balsa: Learning a Query Optimizer Without Expert Demonstrationscited by 18
- 2022Zero-Shot Cost Models for Out-of-the-box Learned Cost Predictioncited by 16
- 2021A Survey on Advancing the DBMS Query Optimizer: Cardinality Estimation, Cost Model, and Plan Enumerationcited by 14
- 2021A Survey on Deep Reinforcement Learning for Data Processing and Analyticscited by 10
- 2021One Model to Rule them All: Towards Zero-Shot Learning for Databasescited by 9
- 2021CARMI: A Cache-Aware Learned Index with a Cost-based Construction Algorithmcited by 8
- 2024The Central Role of the Loss Function in Reinforcement Learningcited by 8
- 2024Gap-Dependent Bounds for Q-Learning using Reference-Advantage Decompositioncited by 8
12 most cited of 31 All 31 (JSON)
- 2026RELOAD: A Robust and Efficient Learned Query Optimizer for Database Systems16 Apr 2026
- 2025Low Rank Learning for Offline Query Optimization8 Apr 2025
- 2025Gap-Dependent Bounds for Federated Q-learning5 Feb 2025
- 2025Breaking the log(1/Delta2) Barrier: Better Batched Best Arm Identification with Adaptive Grids29 Jan 2025
- 2024GenJoin: Conditional Generative Plan-to-Plan Query Optimizer that Learns from Subplan Hints7 Nov 2024
- 2024Gap-Dependent Bounds for Q-Learning using Reference-Advantage Decomposition10 Oct 2024
- 2024The Central Role of the Loss Function in Reinforcement Learning19 Sep 2024
- 2024Hype or Heuristic? Quantum Reinforcement Learning for Join Order Optimisation13 May 2024
- 2023FOSS: A Self-Learned Doctor for Query Optimizer11 Dec 2023
- 2023InTune: Reinforcement Learning-based Data Pipeline Optimization for Deep Recommendation Models13 Aug 2023
- 2023JoinGym: An Efficient Query Optimization Environment for Reinforcement Learning21 Jul 2023
- 2023Kepler: Robust Learning for Faster Parametric Query Optimization11 Jun 2023
12 newest of 31 All 31 (JSON)