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 about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 4226b8bb-80e2-4266-86bf-1537b2413085Cited by top-tier papers28
- Sample-Efficient Cardinality Estimation Using Geometric Deep LearningSilvan Reiner, Michael GrossniklausVLDB 2024 · 20 citations
- PRICE: A Pretrained Model for Cross-Database Cardinality EstimationTianjing Zeng, Junwei Lan, Jiahong Ma, Wenqing Wei et al.VLDB 2025 · 14 citations
- 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
- 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
- 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
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- An End-to-End Learning-based Cost EstimatorJi Sun, Guoliang LiVLDB 2020 · 251 citations
- Bao: Making Learned Query Optimization PracticalRyan Marcus, Parimarjan Negi, Hongzi Mao, Nesime Tatbul et al.SIGMOD 2021 · 242 citations
- DeepDB: Learn from Data, not from Queries!Benjamin Hilprecht, Andreas Schmidt, Moritz Kulessa, Alejandro Molina et al.VLDB 2020 · 154 citations
- NeuroCard: One Cardinality Estimator for All TablesZongheng Yang, Amog Kamsetty, Sifei Luan, Eric Liang et al.VLDB 2021 · 138 citations
Related papers
- DACE: A Database-Agnostic Cost EstimatorZibo Liang, Xu Chen, Yuyang Xia, Runfan Ye et al.ICDE 2024 · 8 citations
- Rethinking Learned Cost Models: Why Start from Scratch?Jiani Yang, Sai Wu, Dongxiang Zhang, Jian Dai et al.SIGMOD 2024 · 14 citations
- 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
- Modeling Shifting Workloads for Learned Database SystemsPeizhi Wu, Zachary G. IvesSIGMOD 2024 · 12 citations
- 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
