Bao: Learning to Steer Query Optimizers
Not on the map. Why?
Abstract (arXiv)
Query optimization remains one of the most challenging problems in data management systems. Recent efforts to apply machine learning techniques to query optimization challenges have been promising, but have shown few practical gains due to substantive training overhead, inability to adapt to changes, and poor tail performance. Motivated by these difficulties and drawing upon a long history of research in multi-armed bandits, we introduce Bao (the BAndit Optimizer). Bao takes advantage of the wisdom built into existing query optimizers by providing per-query optimization hints. Bao combines modern tree convolutional neural networks with Thompson sampling, a decades-old and well-studied reinforcement learning algorithm. As a result, Bao automatically learns from its mistakes and adapts to changes in query workloads, data, and schema. Experimentally, we demonstrate that Bao can quickly (an order of magnitude faster than previous approaches) learn strategies that improve end-to-end query execution performance, including tail latency. In cloud environments, we show that Bao can offer both reduced costs and better performance compared with a sophisticated commercial system.
Key facts. Cited by 62 papers in the map (data through 7 Oct 2026). First posted on arXiv 8 Apr 2020.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2021: 3; 2022: 8; 2023: 8; 2024: 12; 2025: 18; 2026: 13.
62 papers.
Sort:
By area:
- 2022Zeus: Understanding and Optimizing GPU Energy Consumption of DNN Trainingcited by 78
- 2023Unifying the Perspectives of NLP and Software Engineering: A Survey on Language Models for Codecited by 62
- 2023Lero: A Learning-to-Rank Query Optimizercited by 26
- 2022Balsa: Learning a Query Optimizer Without Expert Demonstrationscited by 18
- 2022Zero-Shot Cost Models for Out-of-the-box Learned Cost Predictioncited by 16
- 2025Glia: A Human-Inspired AI for Automated Systems Design and Optimizationcited by 14
- 2025Cortex AISQL: A Production SQL Engine for Unstructured Datacited by 11
- 2021A Survey on Deep Reinforcement Learning for Data Processing and Analyticscited by 10
- 2024E2ETune: End-to-End Knob Tuning via Fine-tuned Generative Language Modelcited by 9
- 2022Detect, Distill and Update: Learned DB Systems Facing Out of Distribution Datacited by 6
- 2025Graph Neural Networks for Databases: A Surveycited by 6
- 2025QUITE: A Query Rewrite System Beyond Rules with LLM Agentscited by 6
38 more
- 2024NeurDB: An AI-powered Autonomous Data Systemcited by 5
- 2021No DBA? No regret! Multi-armed bandits for index tuning of analytical and HTAP workloads with provable guaranteescited by 4
- 2023Real-time Workload Pattern Analysis for Large-scale Cloud Databasescited by 4
- 2024Sibyl: Forecasting Time-Evolving Query Workloadscited by 4
- 2024The Unreasonable Effectiveness of LLMs for Query Optimizationcited by 4
- 2023Kepler: Robust Learning for Faster Parametric Query Optimizationcited by 3
- 2024AnnotatedTables: A Large Tabular Dataset with Language Model Annotationscited by 3
- 2024HERO: Hint-Based Efficient and Reliable Query Optimizercited by 3
- 2025In-Context Adaptation to Concept Drift for Learned Database Operationscited by 3
- 2022Conditionally Risk-Averse Contextual Banditscited by 2
- 2022Deploying a Steered Query Optimizer in Production at Microsoftcited by 2
- 2022Learned-Database Systems Securitycited by 2
- 2023ML-Powered Index Tuning: An Overview of Recent Progress and Open Challengescited by 2
- 2025Supporting Dynamic Agentic Workloads: How Data and Agents Interactcited by 2
- 2026AI-Driven Research for Databasescited by 2
- 2021TENSILE: A Tensor granularity dynamic GPU memory scheduling method toward multiple dynamic workloads systemcited by 1
- 2023JoinGym: An Efficient Query Optimization Environment for Reinforcement Learningcited by 1
- 2023FOSS: A Self-Learned Doctor for Query Optimizercited by 1
- 2024GEqO: ML-Accelerated Semantic Equivalence Detectioncited by 1
- 2024Robust Plan Evaluation based on Approximate Probabilistic Machine Learningcited by 1
- 2024A Novel Technique for Query Plan Representation Based on Graph Neural Netscited 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
- 2024Query Performance Explanation through Large Language Model for HTAP Systemscited by 1
- 2025Large Scale Multi-Task Bayesian Optimization with Large Language Modelscited by 1
- 2025DistJoin: A Decoupled Join Cardinality Estimator based on Adaptive Neural Predicate Modulationcited by 1
- 2022Learning-Based Data Storage [Vision] (Technical Report)cited by 0
- 2023BitE : Accelerating Learned Query Optimization in a Mixed-Workload Environmentcited by 0
- 2025Reqo: A Comprehensive Learning-Based Cost Model for Robust and Explainable Query Optimizationcited by 0
- 2025Selective Use of Yannakakis' Algorithm to Improve Query Performance: Machine Learning to the Rescuecited by 0
- 2025Low Rank Learning for Offline Query Optimizationcited by 0
- 2025BQSched: A Non-intrusive Scheduler for Batch Concurrent Queries via Reinforcement Learningcited by 0
- 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
- 2025An advanced AI driven database systemcited by 0
- 2025OntoTune: Ontology-Driven Learning for Query Optimization with Convolutional Modelscited by 0
- 2025CoLSE: A Lightweight and Robust Hybrid Learned Model for Single-Table Cardinality Estimation using Joint CDFcited by 0
- 2025TiCard: Deployable EXPLAIN-only Residual Learning for Cardinality Estimationcited by 0
50 most cited of 62 All 62 (JSON)
- 2026VikingRAG: Accurate and Token-efficient Retrieval-augmented Generation over Structured Documents10 Sep 2026
- 2026Learning-Augmented Algorithms: Guarantees, Construction Mechanisms, and System-Level Implications4 Sep 2026
- 2026FaultLens: Learning Compact Behavioral Test Suites for Generated Operational Programs27 Aug 2026
- 2026Smart Compaction: Predicting Compaction Utility from Lakehouse Table Metadata9 Aug 2026
- 2026ScaleSense: Cost-Intelligent Scaling Framework via Learned Resource Estimation in Alibaba AnalyticDB8 Aug 2026
- 2026Fully Inductive Cardinality Estimation30 Jul 2026
- 2026Opti-Q: A Constraint-Based Optimization Framework for Multi-LLM Question Planning17 Jun 2026
- 2026Agentic Cost-Aware Query Planning with Knowledge Distillation for Big Data Analytics18 May 2026
- 2026Pre-Execution Query Slot-Time Prediction in Cloud Data Warehouses: A Feature-Scoped Machine Learning Approach22 Apr 2026
- 2026RELOAD: A Robust and Efficient Learned Query Optimizer for Database Systems16 Apr 2026
- 2026AI-Driven Research for Databases8 Apr 2026
- 2026MICRO: A Lightweight Middleware for Optimizing Cross-store Cross-model Graph-Relation Joins [Technical Report]14 Mar 2026
38 more
- 2026Adversarial Query Synthesis via Bayesian Optimization2 Mar 2026
- 2025TiCard: Deployable EXPLAIN-only Residual Learning for Cardinality Estimation16 Dec 2025
- 2025CoLSE: A Lightweight and Robust Hybrid Learned Model for Single-Table Cardinality Estimation using Joint CDF14 Dec 2025
- 2025Supporting Dynamic Agentic Workloads: How Data and Agents Interact10 Dec 2025
- 2025Cortex AISQL: A Production SQL Engine for Unstructured Data10 Nov 2025
- 2025OntoTune: Ontology-Driven Learning for Query Optimization with Convolutional Models10 Nov 2025
- 2025Glia: A Human-Inspired AI for Automated Systems Design and Optimization31 Oct 2025
- 2025An advanced AI driven database system22 Jul 2025
- 2025LLM4Hint: Leveraging Large Language Models for Hint Recommendation in Offline Query Optimization4 Jul 2025
- 2025QUITE: A Query Rewrite System Beyond Rules with LLM Agents9 Jun 2025
- 2025Training-Free Query Optimization via LLM-Based Plan Similarity6 Jun 2025
- 2025In-Context Adaptation to Concept Drift for Learned Database Operations7 May 2025
- 2025BQSched: A Non-intrusive Scheduler for Batch Concurrent Queries via Reinforcement Learning27 Apr 2025
- 2025Low Rank Learning for Offline Query Optimization8 Apr 2025
- 2025DistJoin: A Decoupled Join Cardinality Estimator based on Adaptive Neural Predicate Modulation12 Mar 2025
- 2025Large Scale Multi-Task Bayesian Optimization with Large Language Models11 Mar 2025
- 2025Selective Use of Yannakakis' Algorithm to Improve Query Performance: Machine Learning to the Rescue27 Feb 2025
- 2025Graph Neural Networks for Databases: A Survey18 Feb 2025
- 2025Reqo: A Comprehensive Learning-Based Cost Model for Robust and Explainable Query Optimization29 Jan 2025
- 2024HERO: Hint-Based Efficient and Reliable Query Optimizer3 Dec 2024
- 2024Query Performance Explanation through Large Language Model for HTAP Systems2 Dec 2024
- 2024GenJoin: Conditional Generative Plan-to-Plan Query Optimizer that Learns from Subplan Hints7 Nov 2024
- 2024The Unreasonable Effectiveness of LLMs for Query Optimization5 Nov 2024
- 2024AnnotatedTables: A Large Tabular Dataset with Language Model Annotations24 Jun 2024
- 2024Hype or Heuristic? Quantum Reinforcement Learning for Join Order Optimisation13 May 2024
- 2024A Novel Technique for Query Plan Representation Based on Graph Neural Nets8 May 2024
- 2024NeurDB: An AI-powered Autonomous Data System7 May 2024
- 2024E2ETune: End-to-End Knob Tuning via Fine-tuned Generative Language Model17 Apr 2024
- 2024Robust Plan Evaluation based on Approximate Probabilistic Machine Learning26 Jan 2024
- 2024Sibyl: Forecasting Time-Evolving Query Workloads8 Jan 2024
- 2024GEqO: ML-Accelerated Semantic Equivalence Detection2 Jan 2024
- 2023FOSS: A Self-Learned Doctor for Query Optimizer11 Dec 2023
- 2023Unifying the Perspectives of NLP and Software Engineering: A Survey on Language Models for Code14 Nov 2023
- 2023ML-Powered Index Tuning: An Overview of Recent Progress and Open Challenges25 Aug 2023
- 2023JoinGym: An Efficient Query Optimization Environment for Reinforcement Learning21 Jul 2023
- 2023Real-time Workload Pattern Analysis for Large-scale Cloud Databases5 Jul 2023
- 2023Kepler: Robust Learning for Faster Parametric Query Optimization11 Jun 2023
- 2023BitE : Accelerating Learned Query Optimization in a Mixed-Workload Environment1 Jun 2023
50 newest of 62 All 62 (JSON)
- 2022Zeus: Understanding and Optimizing GPU Energy Consumption of DNN Trainingcited by 78
- 2023Unifying the Perspectives of NLP and Software Engineering: A Survey on Language Models for Codecited by 62
- 2023Lero: A Learning-to-Rank Query Optimizercited by 26
- 2022Balsa: Learning a Query Optimizer Without Expert Demonstrationscited by 18
- 2022Zero-Shot Cost Models for Out-of-the-box Learned Cost Predictioncited by 16
- 2025Glia: A Human-Inspired AI for Automated Systems Design and Optimizationcited by 14
- 2025Cortex AISQL: A Production SQL Engine for Unstructured Datacited by 11
- 2021A Survey on Deep Reinforcement Learning for Data Processing and Analyticscited by 10
- 2024E2ETune: End-to-End Knob Tuning via Fine-tuned Generative Language Modelcited by 9
- 2022Detect, Distill and Update: Learned DB Systems Facing Out of Distribution Datacited by 6
- 2025Graph Neural Networks for Databases: A Surveycited by 6
- 2024NeurDB: An AI-powered Autonomous Data Systemcited by 5
12 most cited of 57 All 57 (JSON)
- 2026Learning-Augmented Algorithms: Guarantees, Construction Mechanisms, and System-Level Implications4 Sep 2026
- 2026FaultLens: Learning Compact Behavioral Test Suites for Generated Operational Programs27 Aug 2026
- 2026Smart Compaction: Predicting Compaction Utility from Lakehouse Table Metadata9 Aug 2026
- 2026ScaleSense: Cost-Intelligent Scaling Framework via Learned Resource Estimation in Alibaba AnalyticDB8 Aug 2026
- 2026Fully Inductive Cardinality Estimation30 Jul 2026
- 2026Opti-Q: A Constraint-Based Optimization Framework for Multi-LLM Question Planning17 Jun 2026
- 2026Pre-Execution Query Slot-Time Prediction in Cloud Data Warehouses: A Feature-Scoped Machine Learning Approach22 Apr 2026
- 2026RELOAD: A Robust and Efficient Learned Query Optimizer for Database Systems16 Apr 2026
- 2026AI-Driven Research for Databases8 Apr 2026
- 2026MICRO: A Lightweight Middleware for Optimizing Cross-store Cross-model Graph-Relation Joins [Technical Report]14 Mar 2026
- 2026Adversarial Query Synthesis via Bayesian Optimization2 Mar 2026
- 2025TiCard: Deployable EXPLAIN-only Residual Learning for Cardinality Estimation16 Dec 2025
12 newest of 57 All 57 (JSON)