Lune

VLDB2023顶会

Robust Query Driven Cardinality Estimation under Changing Workloads

Parimarjan Negi, Ziniu Wu, Andreas Kipf, Nesime Tatbul, Ryan Marcus, Sam Madden, Tim Kraska, Mohammad Alizadeh

摘要

Query driven cardinality estimation models learn from a historical log of queries. They are lightweight, having low storage requirements, fast inference and training, and are easily adaptable for any kind of query. Unfortunately, such models can suffer unpredictably bad performance under workload drift, i.e., if the query pattern or data changes. This makes them unreliable and hard to deploy. We analyze the reasons why models become unpredictable due to workload drift, and introduce modifications to the query representation and neural network training techniques to make query-driven models robust to the effects of workload drift. First, we emulate workload drift in queries involving some unseen tables or columns by randomly masking out some table or column features during training. This forces the model to make predictions with missing query information, relying more on robust features based on up-to-date DBMS statistics that are useful even when query or data drift happens. Second, we introduce join bitmaps, which extends sampling-based features to be consistent across joins using ideas from sideways information passing. Finally, we show how both of these ideas can be adapted to handle data updates.

We show significantly greater generalization than past works across different workloads and databases. For instance, a model trained with our techniques on a simple workload (JOBLight-train), with 40 k synthetically generated queries of at most 3 tables each, is able to generalize to the much more complex Join Order Benchmark, which include queries with up to 16 tables, and improve query runtimes by 2× over PostgreSQL. We show similar robustness results with data updates, and across other workloads. We discuss the situations where we expect, and see, improvements, as well as more challenging workload drift scenarios where these techniques do not improve much over PostgreSQL. However, even in the most challenging scenarios, our models never perform worse than PostgreSQL, while standard query driven models can get much worse than PostgreSQL.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 32 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • The Holon Approach for Simultaneously Tuning Multiple Components in a Self-Driving Database Management System with Machine Learning via Synthesized Proto-Actions 引用了 DeepDB: Learn from Data, not from Queries!
  • The Holon Approach for Simultaneously Tuning Multiple Components in a Self-Driving Database Management System with Machine Learning via Synthesized Proto-Actions 引用了 Bao: Making Learned Query Optimization Practical
  • PRICE: A Pretrained Model for Cross-Database Cardinality Estimation 引用了 Are We Ready For Learned Cardinality Estimation?
  • PRICE: A Pretrained Model for Cross-Database Cardinality Estimation 引用了 ALECE: An Attention-based Learned Cardinality Estimator for SPJ Queries on Dynamic Workloads
  • PRICE: A Pretrained Model for Cross-Database Cardinality Estimation 引用了 Deep Unsupervised Cardinality Estimation
  • Sample-Efficient Cardinality Estimation Using Geometric Deep Learning 引用了 Are We Ready For Learned Cardinality Estimation?
  • Sample-Efficient Cardinality Estimation Using Geometric Deep Learning 引用了 DeepDB: Learn from Data, not from Queries!
  • Sample-Efficient Cardinality Estimation Using Geometric Deep Learning 引用了 Deep Unsupervised Cardinality Estimation
  • Sample-Efficient Cardinality Estimation Using Geometric Deep Learning 引用了 Cardinality Estimation in DBMS: A Comprehensive Benchmark Evaluation
  • Are We Ready For Learned Cardinality Estimation? 引用了 Deep Unsupervised Cardinality Estimation
  • ALECE: An Attention-based Learned Cardinality Estimator for SPJ Queries on Dynamic Workloads 引用了 Are We Ready For Learned Cardinality Estimation?
  • ALECE: An Attention-based Learned Cardinality Estimator for SPJ Queries on Dynamic Workloads 引用了 Deep Unsupervised Cardinality Estimation
  • Cardinality Estimation in DBMS: A Comprehensive Benchmark Evaluation 引用了 Are We Ready For Learned Cardinality Estimation?
  • Cardinality Estimation in DBMS: A Comprehensive Benchmark Evaluation 引用了 DeepDB: Learn from Data, not from Queries!
  • Bao: Making Learned Query Optimization Practical 引用了 Deep Unsupervised Cardinality Estimation
  • Breaking It Down: An In-depth Study of Index Advisors 引用了 Are We Ready For Learned Cardinality Estimation?
  • Breaking It Down: An In-depth Study of Index Advisors 引用了 Cardinality Estimation in DBMS: A Comprehensive Benchmark Evaluation
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper32

  1. ALECE: An Attention-based Learned Cardinality Estimator for SPJ Queries on Dynamic WorkloadsPengfei Li, Wenqing Wei, Rong Zhu, Bolin Ding 等VLDB 2024 · 50 次引用
  2. Breaking It Down: An In-depth Study of Index AdvisorsWei Zhou, Chen Lin, Xuanhe Zhou, Guoliang LiVLDB 2024 · 21 次引用
  3. Sample-Efficient Cardinality Estimation Using Geometric Deep LearningSilvan Reiner, Michael GrossniklausVLDB 2024 · 20 次引用
  4. PRICE: A Pretrained Model for Cross-Database Cardinality EstimationTianjing Zeng, Junwei Lan, Jiahong Ma, Wenqing Wei 等VLDB 2025 · 14 次引用
  5. The Holon Approach for Simultaneously Tuning Multiple Components in a Self-Driving Database Management System with Machine Learning via Synthesized Proto-ActionsWilliam Zhang, Wan Shen Lim, Matthew Butrovich, Andrew PavloVLDB 2024 · 13 次引用

它引用的 Paper17

  1. Bao: Making Learned Query Optimization PracticalRyan Marcus, Parimarjan Negi, Hongzi Mao, Nesime Tatbul 等SIGMOD 2021 · 242 次引用
  2. Deep Unsupervised Cardinality EstimationZongheng Yang, Eric Liang, Amog Kamsetty, Chenggang Wu 等VLDB 2020 · 206 次引用
  3. Cardinality Estimation in DBMS: A Comprehensive Benchmark EvaluationYuxing Han, Ziniu Wu, Peizhi Wu, Rong Zhu 等VLDB 2022 · 169 次引用
  4. Are We Ready For Learned Cardinality Estimation?Xiaoying Wang, Changbo Qu, Weiyuan Wu, Jiannan Wang 等VLDB 2021 · 156 次引用
  5. DeepDB: Learn from Data, not from Queries!Benjamin Hilprecht, Andreas Schmidt, Moritz Kulessa, Alejandro Molina 等VLDB 2020 · 154 次引用

相关 Paper

  1. Are Learned DBMS Components Robust to Workload Drift?: [Experiments & Analysis]Zizhong Meng, Gao Cong, Siqiang LuoSIGMOD 2026
  2. Warper: Efficiently Adapting Learned Cardinality Estimators to Data and Workload DriftsBeibin Li, Yao Lu, Srikanth KandulaSIGMOD 2022 · 29 次引用
  3. Data-Agnostic Cardinality Learning from Imperfect WorkloadsPeizhi Wu, Rong Kang, Tieying Zhang, Jianjun Chen 等VLDB 2025 · 1 次引用
  4. Duet: Efficient and Scalable Hybrid Neural Relation UnderstandingKaixin Zhang, Hongzhi Wang, Yabin Lu, Ziqi Li 等ICDE 2024 · 3 次引用
  5. NeuroCard: One Cardinality Estimator for All TablesZongheng Yang, Amog Kamsetty, Sifei Luan, Eric Liang 等VLDB 2021 · 138 次引用
黄昏的海面,两侧是细线勾勒的悬崖