Lune

VLDB2022Top-tier venue

FACE: A Normalizing Flow based Cardinality Estimator

Jiayi Wang, Chengliang Chai, Jiabin Liu, Guoliang Li

Abstract

Cardinality estimation is one of the most important problems in query optimization. Recently, machine learning based techniques have been proposed to effectively estimate cardinality, which can be broadly classified into query-driven and data-driven approaches. Query-driven approaches learn a regression model from a query to its cardinality; while data-driven approaches learn a distribution of tuples, select some samples that satisfy a SQL query, and use the data distributions of these selected tuples to estimate the cardinality of the SQL query. As query-driven methods rely on training queries, the estimation quality is not reliable when there are no high-quality training queries; while data-driven methods have no such limitation and have high adaptivity. In this work, we focus on data-driven methods. A good datadriven model should achieve three optimization goals. First, the model needs to capture data dependencies between columns and support large domain sizes (achieving high accuracy). Second, the model should achieve high inference efficiency, because many data samples are needed to estimate the cardinality (achieving low inference latency). Third, the model should not be too large (achieving a small model size). However, existing data-driven methods cannot simultaneously optimize the three goals. To address the limitations, we propose a novel cardinality estimator FACE, which leverages the Normalizing Flow based model to learn a continuous joint distribution for relational data. FACE can transform a complex distribution over continuous random variables into a simple distribution (e.g., multivariate normal distribution), and use the probability density to estimate the cardinality. First, we design a dequantization method to make data more "continuous". Second, we propose encoding and indexing techniques to handle Like predicates for string data. Third, we propose a Monte Carlo method to efficiently estimate the cardinality. Experimental results show that our method significantly outperforms existing approaches in terms of estimation accuracy while keeping similar latency and model size.

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.

26 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

  • FactorJoin: A New Cardinality Estimation Framework for Join Queries cites An End-to-End Learning-based Cost Estimator
  • FactorJoin: A New Cardinality Estimation Framework for Join Queries cites Reinforcement Learning with Tree-LSTM for Join Order Selection
  • FactorJoin: A New Cardinality Estimation Framework for Join Queries 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 An End-to-End Learning-based Cost Estimator
  • Are We Ready For Learned Cardinality Estimation? cites Reinforcement Learning with Tree-LSTM for Join Order Selection
  • Are We Ready For Learned Cardinality Estimation? cites NeuroCard: One Cardinality Estimator for All Tables
  • ALECE: An Attention-based Learned Cardinality Estimator for SPJ Queries on Dynamic Workloads cites FactorJoin: A New Cardinality Estimation Framework for Join Queries
  • ALECE: An Attention-based Learned Cardinality Estimator for SPJ Queries on Dynamic Workloads cites Are We Ready For Learned Cardinality Estimation?
  • ALECE: An Attention-based Learned Cardinality Estimator for SPJ Queries on Dynamic Workloads cites Deep Unsupervised Cardinality Estimation
  • ALECE: An Attention-based Learned Cardinality Estimator for SPJ Queries on Dynamic Workloads cites NeuroCard: One Cardinality Estimator for All Tables
  • An End-to-End Learning-based Cost Estimator cites Reinforcement Learning with Tree-LSTM for Join Order Selection
  • Reinforcement Learning with Tree-LSTM for Join Order Selection cites An End-to-End Learning-based Cost Estimator
  • LEON: A New Framework for ML-Aided Query Optimization cites An End-to-End Learning-based Cost Estimator
  • LEON: A New Framework for ML-Aided Query Optimization cites Reinforcement Learning with Tree-LSTM for Join Order Selection
  • LEON: A New Framework for ML-Aided Query Optimization cites NeuroCard: One Cardinality Estimator for All Tables
  • Cost-based or Learning-based? A Hybrid Query Optimizer for Query Plan Selection cites Deep Unsupervised Cardinality Estimation
  • Cost-based or Learning-based? A Hybrid Query Optimizer for Query Plan Selection cites An End-to-End Learning-based Cost Estimator
  • Cost-based or Learning-based? A Hybrid Query Optimizer for Query Plan Selection cites Reinforcement Learning with Tree-LSTM for Join Order Selection
  • Cost-based or Learning-based? A Hybrid Query Optimizer for Query Plan Selection cites NeuroCard: One Cardinality Estimator for All Tables
  • Learned Index: A Comprehensive Experimental Evaluation cites Reinforcement Learning with Tree-LSTM for Join Order Selection
  • Learned Index: A Comprehensive Experimental Evaluation cites Cost-based or Learning-based? A Hybrid Query Optimizer for Query Plan Selection
  • NeuroCard: One Cardinality Estimator for All Tables cites Deep Unsupervised Cardinality Estimation
  • NeuroCard: One Cardinality Estimator for All Tables 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 papers26

  1. Learned Index: A Comprehensive Experimental EvaluationZhaoyan Sun, Xuanhe Zhou, Guoliang LiVLDB 2023 · 87 citations
  2. Cost-based or Learning-based? A Hybrid Query Optimizer for Query Plan SelectionXiang Yu, Chengliang Chai, Guoliang Li, Jiabin LiuVLDB 2022 · 82 citations
  3. FactorJoin: A New Cardinality Estimation Framework for Join QueriesZiniu Wu, Parimarjan Negi, Mohammad Alizadeh, Tim Kraska et al.SIGMOD 2023 · 54 citations
  4. LEON: A New Framework for ML-Aided Query OptimizationXu Chen, Haitian Chen, Zibo Liang, Shuncheng Liu et al.VLDB 2023 · 52 citations
  5. ALECE: An Attention-based Learned Cardinality Estimator for SPJ Queries on Dynamic WorkloadsPengfei Li, Wenqing Wei, Rong Zhu, Bolin Ding et al.VLDB 2024 · 50 citations

Builds on10

  1. An End-to-End Learning-based Cost EstimatorJi Sun, Guoliang LiVLDB 2020 · 251 citations
  2. Deep Unsupervised Cardinality EstimationZongheng Yang, Eric Liang, Amog Kamsetty, Chenggang Wu et al.VLDB 2020 · 206 citations
  3. Reinforcement Learning with Tree-LSTM for Join Order SelectionXiang Yu, Guoliang Li, Chengliang Chai, Nan TangICDE 2020 · 168 citations
  4. Are We Ready For Learned Cardinality Estimation?Xiaoying Wang, Changbo Qu, Weiyuan Wu, Jiannan Wang et al.VLDB 2021 · 156 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. CoLSE: A Lightweight and Robust Hybrid Learned Model for Single-Table Cardinality Estimation Using Joint CDFLankadinee Rathuwadu, Guanli Liu, Christopher Leckie, Renata Borovica-GajicICDE 2026
  2. Learned Cardinality Estimation: A Design Space Exploration and A Comparative EvaluationJi Sun, Jintao Zhang, Zhaoyan Sun, Guoliang Li et al.VLDB 2022 · 90 citations
  3. Sample-Efficient Cardinality Estimation Using Geometric Deep LearningSilvan Reiner, Michael GrossniklausVLDB 2024 · 20 citations
  4. Cardinality Estimation in DBMS: A Comprehensive Benchmark EvaluationYuxing Han, Ziniu Wu, Peizhi Wu, Rong Zhu et al.VLDB 2022 · 169 citations
  5. Efficient and Effective Cardinality Estimation for Skyline FamilyXiaoye Miao, Yangyang Wu, Jiazhen Peng, Yunjun Gao et al.SIGMOD 2023 · 4 citations
Dusk over the sea between two cliffs drawn in fine vertical lines