FACE: A Normalizing Flow based Cardinality Estimator
Jiayi Wang, Chengliang Chai, Jiabin Liu, Guoliang Li
摘要
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.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 26 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- FactorJoin: A New Cardinality Estimation Framework for Join Queries 引用了 An End-to-End Learning-based Cost Estimator
- FactorJoin: A New Cardinality Estimation Framework for Join Queries 引用了 Reinforcement Learning with Tree-LSTM for Join Order Selection
- FactorJoin: A New Cardinality Estimation Framework for Join Queries 引用了 NeuroCard: One Cardinality Estimator for All Tables
- Are We Ready For Learned Cardinality Estimation? 引用了 Deep Unsupervised Cardinality Estimation
- Are We Ready For Learned Cardinality Estimation? 引用了 An End-to-End Learning-based Cost Estimator
- Are We Ready For Learned Cardinality Estimation? 引用了 Reinforcement Learning with Tree-LSTM for Join Order Selection
- Are We Ready For Learned Cardinality Estimation? 引用了 NeuroCard: One Cardinality Estimator for All Tables
- ALECE: An Attention-based Learned Cardinality Estimator for SPJ Queries on Dynamic Workloads 引用了 FactorJoin: A New Cardinality Estimation Framework for Join Queries
- 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
- ALECE: An Attention-based Learned Cardinality Estimator for SPJ Queries on Dynamic Workloads 引用了 NeuroCard: One Cardinality Estimator for All Tables
- An End-to-End Learning-based Cost Estimator 引用了 Reinforcement Learning with Tree-LSTM for Join Order Selection
- Reinforcement Learning with Tree-LSTM for Join Order Selection 引用了 An End-to-End Learning-based Cost Estimator
- LEON: A New Framework for ML-Aided Query Optimization 引用了 An End-to-End Learning-based Cost Estimator
- LEON: A New Framework for ML-Aided Query Optimization 引用了 Reinforcement Learning with Tree-LSTM for Join Order Selection
- LEON: A New Framework for ML-Aided Query Optimization 引用了 NeuroCard: One Cardinality Estimator for All Tables
- Cost-based or Learning-based? A Hybrid Query Optimizer for Query Plan Selection 引用了 Deep Unsupervised Cardinality Estimation
- Cost-based or Learning-based? A Hybrid Query Optimizer for Query Plan Selection 引用了 An End-to-End Learning-based Cost Estimator
- Cost-based or Learning-based? A Hybrid Query Optimizer for Query Plan Selection 引用了 Reinforcement Learning with Tree-LSTM for Join Order Selection
- Cost-based or Learning-based? A Hybrid Query Optimizer for Query Plan Selection 引用了 NeuroCard: One Cardinality Estimator for All Tables
- Learned Index: A Comprehensive Experimental Evaluation 引用了 Reinforcement Learning with Tree-LSTM for Join Order Selection
- Learned Index: A Comprehensive Experimental Evaluation 引用了 Cost-based or Learning-based? A Hybrid Query Optimizer for Query Plan Selection
- NeuroCard: One Cardinality Estimator for All Tables 引用了 Deep Unsupervised Cardinality Estimation
- NeuroCard: One Cardinality Estimator for All Tables 引用了 An End-to-End Learning-based Cost Estimator
引用它的顶会 Paper26
- Learned Index: A Comprehensive Experimental EvaluationZhaoyan Sun, Xuanhe Zhou, Guoliang LiVLDB 2023 · 87 次引用
- Cost-based or Learning-based? A Hybrid Query Optimizer for Query Plan SelectionXiang Yu, Chengliang Chai, Guoliang Li, Jiabin LiuVLDB 2022 · 82 次引用
- FactorJoin: A New Cardinality Estimation Framework for Join QueriesZiniu Wu, Parimarjan Negi, Mohammad Alizadeh, Tim Kraska 等SIGMOD 2023 · 54 次引用
- LEON: A New Framework for ML-Aided Query OptimizationXu Chen, Haitian Chen, Zibo Liang, Shuncheng Liu 等VLDB 2023 · 52 次引用
- ALECE: An Attention-based Learned Cardinality Estimator for SPJ Queries on Dynamic WorkloadsPengfei Li, Wenqing Wei, Rong Zhu, Bolin Ding 等VLDB 2024 · 50 次引用
它引用的 Paper10
- An End-to-End Learning-based Cost EstimatorJi Sun, Guoliang LiVLDB 2020 · 251 次引用
- Deep Unsupervised Cardinality EstimationZongheng Yang, Eric Liang, Amog Kamsetty, Chenggang Wu 等VLDB 2020 · 206 次引用
- Reinforcement Learning with Tree-LSTM for Join Order SelectionXiang Yu, Guoliang Li, Chengliang Chai, Nan TangICDE 2020 · 168 次引用
- Are We Ready For Learned Cardinality Estimation?Xiaoying Wang, Changbo Qu, Weiyuan Wu, Jiannan Wang 等VLDB 2021 · 156 次引用
- NeuroCard: One Cardinality Estimator for All TablesZongheng Yang, Amog Kamsetty, Sifei Luan, Eric Liang 等VLDB 2021 · 138 次引用
相关 Paper
- 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
- Learned Cardinality Estimation: A Design Space Exploration and A Comparative EvaluationJi Sun, Jintao Zhang, Zhaoyan Sun, Guoliang Li 等VLDB 2022 · 90 次引用
- Sample-Efficient Cardinality Estimation Using Geometric Deep LearningSilvan Reiner, Michael GrossniklausVLDB 2024 · 20 次引用
- Cardinality Estimation in DBMS: A Comprehensive Benchmark EvaluationYuxing Han, Ziniu Wu, Peizhi Wu, Rong Zhu 等VLDB 2022 · 169 次引用
- Efficient and Effective Cardinality Estimation for Skyline FamilyXiaoye Miao, Yangyang Wu, Jiazhen Peng, Yunjun Gao 等SIGMOD 2023 · 4 次引用
