Lune

VLDB2024Top-tier venue

Sample-Efficient Cardinality Estimation Using Geometric Deep Learning

Silvan Reiner, Michael Grossniklaus

Abstract

In database systems, accurate cardinality estimation is a cornerstone of effective query optimization. In this context, estimators that use machine learning have shown significant promise. Despite their potential, the effectiveness of these learned estimators strongly depends on their ability to learn from small training sets. This paper presents a novel approach for learned cardinality estimation that addresses this issue by enhancing sample efficiency. We propose a neural network architecture informed by geometric deep learning principles that represents queries as join graphs. Furthermore, we introduce an innovative encoding for complex predicates, treating their encoding as a feature selection problem. Additionally, we devise a regularization term that employs equalities of the relational algebra and three-valued logic, augmenting the training process without requiring additional ground truth cardinalities. We rigorously evaluate our model across multiple benchmarks, examining q-errors, runtimes, and the impact of workload distribution shifts. Our results demonstrate that our model significantly improves the end-to-end runtimes of PostgreSQL, even with cardinalities gathered from as little as 100 query executions.

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.

12 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 Are We Ready For Learned Cardinality Estimation?
  • How Good are Learned Cost Models, Really? Insights from Query Optimization Tasks cites Deep Unsupervised Cardinality Estimation
  • How Good are Learned Cost Models, Really? Insights from Query Optimization Tasks cites An End-to-End Learning-based Cost Estimator
  • Distinctiveness Maximization in Datasets Assemblage cites Deep Unsupervised Cardinality Estimation
  • Distinctiveness Maximization in Datasets Assemblage cites An End-to-End Learning-based Cost Estimator
  • RankPQO: Learning-to-Rank for Parametric Query Optimization cites An End-to-End Learning-based Cost Estimator
  • Are We Ready For Learned Cardinality Estimation? cites Deep Unsupervised Cardinality Estimation
  • Are We Ready For Learned Cardinality Estimation? cites An End-to-End Learning-based Cost Estimator
  • Learned Offline Query Planning via Bayesian Optimization cites An End-to-End Learning-based Cost Estimator
  • Cardinality Estimation in DBMS: A Comprehensive Benchmark Evaluation cites Are We Ready For Learned Cardinality Estimation?
  • Cardinality Estimation in DBMS: A Comprehensive Benchmark Evaluation cites An End-to-End Learning-based Cost Estimator
  • Low Rank Learning for Offline Query Optimization cites Deep Unsupervised Cardinality Estimation
  • Low Rank Learning for Offline Query Optimization cites Learned Offline Query Planning via Bayesian Optimization
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers12

  1. 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
  2. Learned Offline Query Planning via Bayesian OptimizationJeffrey Tao, Natalie Maus, Haydn Thomas Jones, Yimeng Zeng et al.SIGMOD 2025 · 5 citations
  3. Low Rank Learning for Offline Query OptimizationZixuan Yi, Yao Tian, Zachary G. Ives, Ryan MarcusSIGMOD 2025 · 4 citations
  4. Distinctiveness Maximization in Datasets AssemblageTingting Wang, Shixun Huang, Zhifeng Bao, J. Shane Culpepper et al.WWW 2025 · 3 citations
  5. RankPQO: Learning-to-Rank for Parametric Query OptimizationSongsong Mo, Yue Zhao, Zhifeng Bao, Quanqing Xu et al.VLDB 2025 · 3 citations

Builds on20

  1. Design Space for Graph Neural NetworksJiaxuan You, Zhitao Ying, Jure LeskovecNeurIPS 2020 · 409 citations
  2. An End-to-End Learning-based Cost EstimatorJi Sun, Guoliang LiVLDB 2020 · 251 citations
  3. Deep Unsupervised Cardinality EstimationZongheng Yang, Eric Liang, Amog Kamsetty, Chenggang Wu et al.VLDB 2020 · 206 citations
  4. Cardinality Estimation in DBMS: A Comprehensive Benchmark EvaluationYuxing Han, Ziniu Wu, Peizhi Wu, Rong Zhu et al.VLDB 2022 · 169 citations
  5. Are We Ready For Learned Cardinality Estimation?Xiaoying Wang, Changbo Qu, Weiyuan Wu, Jiannan Wang et al.VLDB 2021 · 156 citations

Related papers

  1. Learned Cardinality Estimation: A Design Space Exploration and A Comparative EvaluationJi Sun, Jintao Zhang, Zhaoyan Sun, Guoliang Li et al.VLDB 2022 · 90 citations
  2. Deep Learning Models for Selectivity Estimation of Multi-Attribute QueriesShohedul Hasan, Saravanan Thirumuruganathan, Jees Augustine, Nick Koudas et al.SIGMOD 2020 · 101 citations
  3. Speeding Up End-to-end Query Execution via Learning-based Progressive Cardinality EstimationFang Wang, Xiao Yan, Man Lung Yiu, Shuai Li et al.SIGMOD 2023 · 24 citations
  4. NeuroCard: One Cardinality Estimator for All TablesZongheng Yang, Amog Kamsetty, Sifei Luan, Eric Liang et al.VLDB 2021 · 138 citations
  5. FACE: A Normalizing Flow based Cardinality EstimatorJiayi Wang, Chengliang Chai, Jiabin Liu, Guoliang LiVLDB 2022
Dusk over the sea between two cliffs drawn in fine vertical lines