Lune

VLDB2022Top-tier venue

Zero-Shot Cost Models for Out-of-the-box Learned Cost Prediction

Benjamin Hilprecht, Carsten Binnig

Abstract

In this paper, we introduce zero-shot cost models, which enable learned cost estimation that generalizes to unseen databases. In contrast to state-of-the-art workload-driven approaches, which require to execute a large set of training queries on every new database, zero-shot cost models thus allow to instantiate a learned cost model out-of-the-box without expensive training data collection. To enable such zero-shot cost models, we suggest a new learning paradigm based on pre-trained cost models. As core contributions to support the transfer of such a pre-trained cost model to unseen databases, we introduce a new model architecture and representation technique for encoding query workloads as input to those models. As we will show in our evaluation, zero-shot cost estimation can provide more accurate cost estimates than state-of-the-art models for a wide range of (real-world) databases without requiring any query executions on unseen databases. Furthermore, we show that zero-shot cost models can be used in a few-shot mode that further improves their quality by retraining them just with a small number of additional training queries on the unseen database.

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.

28 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

  • How Good are Learned Cost Models, Really? Insights from Query Optimization Tasks cites Sample-Efficient Cardinality Estimation Using Geometric Deep Learning
  • How Good are Learned Cost Models, Really? Insights from Query Optimization Tasks cites DeepDB: Learn from Data, not from Queries!
  • How Good are Learned Cost Models, Really? Insights from Query Optimization Tasks cites An End-to-End Learning-based Cost Estimator
  • How Good are Learned Cost Models, Really? Insights from Query Optimization Tasks cites NeuroCard: One Cardinality Estimator for All Tables
  • How Good are Learned Cost Models, Really? Insights from Query Optimization Tasks cites Bao: Making Learned Query Optimization Practical
  • PRICE: A Pretrained Model for Cross-Database Cardinality Estimation cites Language Models are Few-Shot Learners
  • PRICE: A Pretrained Model for Cross-Database Cardinality Estimation cites NeuroCard: One Cardinality Estimator for All Tables
  • Sample-Efficient Cardinality Estimation Using Geometric Deep Learning cites DeepDB: Learn from Data, not from Queries!
  • Sample-Efficient Cardinality Estimation Using Geometric Deep Learning cites An End-to-End Learning-based Cost Estimator
  • Sample-Efficient Cardinality Estimation Using Geometric Deep Learning cites NeuroCard: One Cardinality Estimator for All Tables
  • DeepDB: Learn from Data, not from Queries! cites An End-to-End Learning-based Cost Estimator
  • Blueprinting the Cloud: Unifying and Automatically Optimizing Cloud Data Infrastructures with BRAD cites An End-to-End Learning-based Cost Estimator
  • Blueprinting the Cloud: Unifying and Automatically Optimizing Cloud Data Infrastructures with BRAD cites Check Out the Big Brain on BRAD: Simplifying Cloud Data Processing with Learned Automated Data Meshes
  • Blueprinting the Cloud: Unifying and Automatically Optimizing Cloud Data Infrastructures with BRAD cites Bao: Making Learned Query Optimization Practical
  • Check Out the Big Brain on BRAD: Simplifying Cloud Data Processing with Learned Automated Data Meshes cites DeepDB: Learn from Data, not from Queries!
  • Check Out the Big Brain on BRAD: Simplifying Cloud Data Processing with Learned Automated Data Meshes cites An End-to-End Learning-based Cost Estimator
  • Check Out the Big Brain on BRAD: Simplifying Cloud Data Processing with Learned Automated Data Meshes cites Bao: Making Learned Query Optimization Practical
  • NeuroCard: One Cardinality Estimator for All Tables cites An End-to-End Learning-based Cost Estimator
  • 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 papers28

  1. Sample-Efficient Cardinality Estimation Using Geometric Deep LearningSilvan Reiner, Michael GrossniklausVLDB 2024 · 20 citations
  2. PRICE: A Pretrained Model for Cross-Database Cardinality EstimationTianjing Zeng, Junwei Lan, Jiahong Ma, Wenqing Wei et al.VLDB 2025 · 14 citations
  3. How Good are Learned Cost Models, Really? Insights from Query Optimization TasksRoman Heinrich, Manisha Luthra, Johannes Wehrstein, Harald Kornmayer et al.SIGMOD 2025 · 13 citations
  4. Check Out the Big Brain on BRAD: Simplifying Cloud Data Processing with Learned Automated Data MeshesTim Kraska, Tianyu Li, Samuel Madden, Markos Markakis et al.VLDB 2023 · 13 citations
  5. Blueprinting the Cloud: Unifying and Automatically Optimizing Cloud Data Infrastructures with BRADGeoffrey X. Yu, Ziniu Wu, Ferdinand Kossmann, Tianyu Li et al.VLDB 2024 · 11 citations

Builds on10

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. An End-to-End Learning-based Cost EstimatorJi Sun, Guoliang LiVLDB 2020 · 251 citations
  3. Bao: Making Learned Query Optimization PracticalRyan Marcus, Parimarjan Negi, Hongzi Mao, Nesime Tatbul et al.SIGMOD 2021 · 242 citations
  4. DeepDB: Learn from Data, not from Queries!Benjamin Hilprecht, Andreas Schmidt, Moritz Kulessa, Alejandro Molina et al.VLDB 2020 · 154 citations
  5. NeuroCard: One Cardinality Estimator for All TablesZongheng Yang, Amog Kamsetty, Sifei Luan, Eric Liang et al.VLDB 2021 · 138 citations

Related papers

  1. DACE: A Database-Agnostic Cost EstimatorZibo Liang, Xu Chen, Yuyang Xia, Runfan Ye et al.ICDE 2024 · 8 citations
  2. Rethinking Learned Cost Models: Why Start from Scratch?Jiani Yang, Sai Wu, Dongxiang Zhang, Jian Dai et al.SIGMOD 2024 · 14 citations
  3. ZERoTuNE: Learned Zero-Shot Cost Models for Parallelism Tuning in Stream ProcessingPratyush Agnihotri, Boris Koldehofe, Paul Stiegele, Roman Heinrich et al.ICDE 2024 · 13 citations
  4. Modeling Shifting Workloads for Learned Database SystemsPeizhi Wu, Zachary G. IvesSIGMOD 2024 · 12 citations
  5. Leveraging Table Content for Zero-shot Text-to-SQL with Meta-LearningYongrui Chen, Xinnan Guo, Chaojie Wang, Jian Qiu et al.AAAI 2021 · 11 citations
Dusk over the sea between two cliffs drawn in fine vertical lines