Efficiently Approximating Selectivity Functions using Low Overhead Regression Models
Anshuman Dutt, Chi Wang, Vivek R. Narasayya, Surajit Chaudhuri
Abstract
Today's query optimizers use fast selectivity estimation techniques but are known to be susceptible to large estimation errors. Recent work on supervised learned models for selectivity estimation significantly improves accuracy while ensuring relatively low estimation overhead. However, these models impose significant model construction cost as they need large numbers of training examples and computing selectivity labels is costly for large datasets. We propose a novel model construction method that incrementally generates training data and uses approximate selectivity labels, that reduces total construction cost by an order of magnitude while preserving most of the accuracy gains. The proposed method is particularly attractive for model designs that are faster-to-train for a given number of training examples, but such models are known to support a limited class of query expressions. We broaden the applicability of such supervised models to the class of select-project-join query expressions with range predicates and IN clauses. Our extensive evaluation on synthetic benchmark and real-world queries shows that the 95th-percentile error of our proposed models is 10-100X better than traditional selectivity estimators. We also demonstrate significant gains in plan quality as a result of improved selectivity estimates.
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.
19 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Robust Query Driven Cardinality Estimation under Changing Workloads cites Are We Ready For Learned Cardinality Estimation?
- Robust Query Driven Cardinality Estimation under Changing Workloads cites Fauce: Fast and Accurate Deep Ensembles with Uncertainty for Cardinality Estimation
- Robust Query Driven Cardinality Estimation under Changing Workloads cites Deep Unsupervised Cardinality Estimation
- Robust Query Driven Cardinality Estimation under Changing Workloads cites QuickSel: Quick Selectivity Learning with Mixture Models
- Robust Query Driven Cardinality Estimation under Changing Workloads cites Flow-Loss: Learning Cardinality Estimates That Matter
- Are We Ready For Learned Cardinality Estimation? cites Deep Unsupervised Cardinality Estimation
- Are We Ready For Learned Cardinality Estimation? cites QuickSel: Quick Selectivity Learning with Mixture Models
- Fauce: Fast and Accurate Deep Ensembles with Uncertainty for Cardinality Estimation cites Are We Ready For Learned Cardinality Estimation?
- Fauce: Fast and Accurate Deep Ensembles with Uncertainty for Cardinality Estimation cites Deep Unsupervised Cardinality Estimation
- Fauce: Fast and Accurate Deep Ensembles with Uncertainty for Cardinality Estimation cites Flow-Loss: Learning Cardinality Estimates That Matter
- Deep Unsupervised Cardinality Estimation cites QuickSel: Quick Selectivity Learning with Mixture Models
- QuickSel: Quick Selectivity Learning with Mixture Models cites Deep Unsupervised Cardinality Estimation
- Flow-Loss: Learning Cardinality Estimates That Matter cites Are We Ready For Learned Cardinality Estimation?
- Flow-Loss: Learning Cardinality Estimates That Matter cites Deep Unsupervised Cardinality Estimation
- Flow-Loss: Learning Cardinality Estimates That Matter cites QuickSel: Quick Selectivity Learning with Mixture Models
Cited by top-tier papers19
- Are We Ready For Learned Cardinality Estimation?Xiaoying Wang, Changbo Qu, Weiyuan Wu, Jiannan Wang et al.VLDB 2021 · 156 citations
- Flow-Loss: Learning Cardinality Estimates That MatterParimarjan Negi, Ryan Marcus, Andreas Kipf, Hongzi Mao et al.VLDB 2021 · 102 citations
- Robust Query Driven Cardinality Estimation under Changing WorkloadsParimarjan Negi, Ziniu Wu, Andreas Kipf, Nesime Tatbul et al.VLDB 2023 · 88 citations
- Fauce: Fast and Accurate Deep Ensembles with Uncertainty for Cardinality EstimationJie Liu, Wenqian Dong, Dong Li, Qingqing ZhouVLDB 2021 · 71 citations
- DSB: A Decision Support Benchmark for Workload-Driven and Traditional Database SystemsBailu Ding, Surajit Chaudhuri, Johannes Gehrke, Vivek R. NarasayyaVLDB 2021 · 62 citations
Builds on3
- Deep Unsupervised Cardinality EstimationZongheng Yang, Eric Liang, Amog Kamsetty, Chenggang Wu et al.VLDB 2020 · 206 citations
- QuickSel: Quick Selectivity Learning with Mixture ModelsYongjoo Park, Shucheng Zhong, Barzan MozafariSIGMOD 2020 · 66 citations
- Efficient Join Synopsis Maintenance for Data WarehouseZhuoyue Zhao, Feifei Li, Yuxi LiuSIGMOD 2020 · 19 citations
Related papers
- Deep Learning Models for Selectivity Estimation of Multi-Attribute QueriesShohedul Hasan, Saravanan Thirumuruganathan, Jees Augustine, Nick Koudas et al.SIGMOD 2020 · 101 citations
- 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
- 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
- Warper: Efficiently Adapting Learned Cardinality Estimators to Data and Workload DriftsBeibin Li, Yao Lu, Srikanth KandulaSIGMOD 2022 · 29 citations
- LEAP: A Low-cost Spark SQL Query Optimizer using Pairwise ComparisonJunhao Ye, Jiahui Li, Lu Chen, Yuren Mao et al.VLDB 2025 · 2 citations
