Lune

VLDB2023Top-tier venue

Simple Adaptive Query Processing vs. Learned Query Optimizers: Observations and Analysis

Yunjia Zhang, Yannis Chronis, Jignesh M. Patel, Theodoros Rekatsinas

Abstract

There have been many decades of work on optimizing query processing in database management systems. Recently, modern machine learning (ML), and specifically reinforcement learning (RL), has gained increased attention as a means to develop a query optimizer (QO). In this work, we take a closer look at two recent state-of-the-art (SOTA) RL-based QO methods to better understand their behavior. We find that these RL-based methods do not generalize as well as it seems at first glance. Thus, we ask a simple question: How do SOTA RL-based QOs compare to a simple, modern, adaptive query processing approach? To answer this question, we choose two simple adaptive query processing techniques and implemented them in PostgreSQL. The first adapts an individual join operation on-the-fly and switches between a Nested Loop Join algorithm and a Hash Join algorithm to avoid sub-optimal join algorithm decisions. The second is a technique called Lookahead Information Passing (LIP), in which adaptive semijoin techniques are used to make a pipeline of join operations execute efficiently. To our surprise, we find that this simple adaptive query processing approach is not only competitive to the SOTA RL-based approaches but, in some cases, outperforms the RL-based approaches. The adaptive approach is also appealing because it does not require an expensive training step, and it is fully interpretable compared to the RL-based QO approaches. Further, the adaptive method works across complex query constructs that RL-based QO methods currently cannot optimize.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

8 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • λ-Tune: Harnessing Large Language Models for Automated Database System Tuning cites Balsa: Learning a Query Optimizer Without Expert Demonstrations
  • λ-Tune: Harnessing Large Language Models for Automated Database System Tuning cites Bao: Making Learned Query Optimization Practical
  • Astrid: Accurate Selectivity Estimation for String Predicates using Deep Learning cites An End-to-End Learning-based Cost Estimator
  • Robust Predicate Transfer with Dynamic Execution cites Parachute: Single-Pass Bi-Directional Information Passing
  • Robust Predicate Transfer with Dynamic Execution cites Is Your Learned Query Optimizer Behaving As You Expect? A Machine Learning Perspective
  • Balsa: Learning a Query Optimizer Without Expert Demonstrations cites Astrid: Accurate Selectivity Estimation for String Predicates using Deep Learning
  • Balsa: Learning a Query Optimizer Without Expert Demonstrations cites An End-to-End Learning-based Cost Estimator
  • Balsa: Learning a Query Optimizer Without Expert Demonstrations cites Bao: Making Learned Query Optimization Practical
  • Is Your Learned Query Optimizer Behaving As You Expect? A Machine Learning Perspective cites Balsa: Learning a Query Optimizer Without Expert Demonstrations
  • Is Your Learned Query Optimizer Behaving As You Expect? A Machine Learning Perspective cites Bao: Making Learned Query Optimization Practical
  • Bao: Making Learned Query Optimization Practical cites An End-to-End Learning-based Cost Estimator
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers8

  1. λ-Tune: Harnessing Large Language Models for Automated Database System TuningVictor Giannakouris, Immanuel TrummerSIGMOD 2025 · 20 citations
  2. Is Your Learned Query Optimizer Behaving As You Expect? A Machine Learning PerspectiveClaude Lehmann, Pavel Sulimov, Kurt StockingerVLDB 2024 · 17 citations
  3. Parachute: Single-Pass Bi-Directional Information PassingMihail Stoian, Andreas Zimmerer, Skander Krid, Amadou Ngom et al.VLDB 2025 · 6 citations
  4. Optimizing Queries with Many-to-Many JoinsHasara Kalumin, Amol DeshpandeICDE 2025 · 3 citations
  5. Robust Predicate Transfer with Dynamic ExecutionYiming Qiao, Peter Boncz, Huanchen ZhangVLDB 2026 · 2 citations

Builds on6

  1. An End-to-End Learning-based Cost EstimatorJi Sun, Guoliang LiVLDB 2020 · 251 citations
  2. Bao: Making Learned Query Optimization PracticalRyan Marcus, Parimarjan Negi, Hongzi Mao, Nesime Tatbul et al.SIGMOD 2021 · 242 citations
  3. Balsa: Learning a Query Optimizer Without Expert DemonstrationsZongheng Yang, Wei-Lin Chiang, Sifei Luan, Gautam Mittal et al.SIGMOD 2022 · 99 citations
  4. Pushing Data-Induced Predicates Through Joins in Big-Data ClustersLaurel J. Orr, Srikanth Kandula, Surajit ChaudhuriVLDB 2020 · 35 citations
  5. Astrid: Accurate Selectivity Estimation for String Predicates using Deep LearningSuraj Shetiya, Saravanan Thirumuruganathan, Nick Koudas, Gautam DasVLDB 2021 · 31 citations

Related papers

  1. ADOPT: Adaptively Optimizing Attribute Orders for Worst-Case Optimal Join Algorithms via Reinforcement LearningJunxiong Wang, Immanuel Trummer, Ahmet Kara, Dan OlteanuVLDB 2023 · 10 citations
  2. GenJoin: Conditional Generative Plan-to-Plan Query Optimizer that Learns from Subplan HintsPavel Sulimov, Claude Lehmann, Kurt StockingerSIGMOD 2026 · 3 citations
  3. LOGER: A Learned Optimizer towards Generating Efficient and Robust Query Execution PlansTianyi Chen, Jun Gao, Hedui Chen, Yaofeng TuVLDB 2023 · 54 citations
  4. Lero: A Learning-to-Rank Query OptimizerRong Zhu, Wei Chen, Bolin Ding, Xingguang Chen et al.VLDB 2023 · 102 citations
  5. Reinforcement Learning with Tree-LSTM for Join Order SelectionXiang Yu, Guoliang Li, Chengliang Chai, Nan TangICDE 2020 · 168 citations
Dusk over the sea between two cliffs drawn in fine vertical lines