Lune

VLDB2024Top-tier venue

ALECE: An Attention-based Learned Cardinality Estimator for SPJ Queries on Dynamic Workloads

Pengfei Li, Wenqing Wei, Rong Zhu, Bolin Ding, Jingren Zhou, Hua Lu

Abstract

For efficient query processing, DBMS query optimizers have for decades relied on delicate cardinality estimation methods. In this work, we propose an Attention-based LEarned Cardinality Estimator ( ALECE for short) for SPJ queries. The core idea is to discover the implicit relationships between queries and underlying dynamic data using attention mechanisms in ALECE's two modules that are built on top of carefully designed featurizations for data and queries. In particular, from all attributes in the database, the data-encoder module obtains organic and learnable aggregations which implicitly represent correlations among the attributes, whereas the query-analyzer module builds a bridge between the query featurizations and the data aggregations to predict the query's cardinality. We experimentally evaluate ALECE on multiple dynamic workloads. The results show that ALECE enables PostgreSQL's optimizer to achieve nearly optimal performance, clearly outperforming its built-in cardinality estimator and other alternatives.

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.

20 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

  • T3: Accurate and Fast Performance Prediction for Relational Database Systems With Compiled Decision Trees cites NeuroCard: One Cardinality Estimator for All Tables
  • LIMAO: A Framework for Lifelong Modular Learned Query Optimization cites FLAT: Fast, Lightweight and Accurate Method for Cardinality Estimation
  • LIMAO: A Framework for Lifelong Modular Learned Query Optimization cites Deep Unsupervised Cardinality Estimation
  • LIMAO: A Framework for Lifelong Modular Learned Query Optimization cites NeuroCard: One Cardinality Estimator for All Tables
  • PRICE: A Pretrained Model for Cross-Database Cardinality Estimation cites Are We Ready For Learned Cardinality Estimation?
  • 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 Deep Unsupervised Cardinality Estimation
  • PRICE: A Pretrained Model for Cross-Database Cardinality Estimation cites NeuroCard: One Cardinality Estimator for All Tables
  • Are We Ready For Learned Cardinality Estimation? cites Deep Unsupervised Cardinality Estimation
  • Are We Ready For Learned Cardinality Estimation? cites NeuroCard: One Cardinality Estimator for All Tables
  • FLAT: Fast, Lightweight and Accurate Method for Cardinality Estimation cites Are We Ready For Learned Cardinality Estimation?
  • FLAT: Fast, Lightweight and Accurate Method for Cardinality Estimation cites NeuroCard: One Cardinality Estimator for All Tables
  • Learned Offline Query Planning via Bayesian Optimization cites NeuroCard: One Cardinality Estimator for All Tables
  • 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
  • NeuroCard: One Cardinality Estimator for All Tables cites Deep Unsupervised Cardinality Estimation
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers20

  1. PRICE: A Pretrained Model for Cross-Database Cardinality EstimationTianjing Zeng, Junwei Lan, Jiahong Ma, Wenqing Wei et al.VLDB 2025 · 14 citations
  2. T3: Accurate and Fast Performance Prediction for Relational Database Systems With Compiled Decision TreesMaximilian Rieger, Thomas NeumannSIGMOD 2025 · 5 citations
  3. Learned Offline Query Planning via Bayesian OptimizationJeffrey Tao, Natalie Maus, Haydn Thomas Jones, Yimeng Zeng et al.SIGMOD 2025 · 5 citations
  4. LIMAO: A Framework for Lifelong Modular Learned Query OptimizationQihan Zhang, Shaolin Xie, Ibrahim SabekVLDB 2025 · 4 citations
  5. Low Rank Learning for Offline Query OptimizationZixuan Yi, Yao Tian, Zachary G. Ives, Ryan MarcusSIGMOD 2025 · 4 citations

Builds on15

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. Deep Unsupervised Cardinality EstimationZongheng Yang, Eric Liang, Amog Kamsetty, Chenggang Wu et al.VLDB 2020 · 206 citations
  3. Are We Ready For Learned Cardinality Estimation?Xiaoying Wang, Changbo Qu, Weiyuan Wu, Jiannan Wang et al.VLDB 2021 · 156 citations
  4. NeuroCard: One Cardinality Estimator for All TablesZongheng Yang, Amog Kamsetty, Sifei Luan, Eric Liang et al.VLDB 2021 · 138 citations
  5. FLAT: Fast, Lightweight and Accurate Method for Cardinality EstimationRong Zhu, Ziniu Wu, Yuxing Han, Kai Zeng et al.VLDB 2021 · 120 citations

Related papers

  1. ACE: A Cardinality Estimator for Set-Valued QueriesYufan Sheng, Xin Cao, Kaiqi Zhao, Yixiang Fang et al.VLDB 2025
  2. 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
  3. Learned Cardinality Estimation: A Design Space Exploration and A Comparative EvaluationJi Sun, Jintao Zhang, Zhaoyan Sun, Guoliang Li et al.VLDB 2022 · 90 citations
  4. Sample-Efficient Cardinality Estimation Using Geometric Deep LearningSilvan Reiner, Michael GrossniklausVLDB 2024 · 20 citations
  5. From Single to Multiple Attributes: Experimental Insights on Sampling-Based Distinct Combination Estimation in Group-by QueriesYujie Zhang, Xiaochun Yang, Bin Wang, Yuan SuiICDE 2026
Dusk over the sea between two cliffs drawn in fine vertical lines