Selectivity Functions of Range Queries are Learnable
Xiao Hu, Yuxi Liu, Haibo Xiu, Pankaj K. Agarwal, Debmalya Panigrahi, Sudeepa Roy, Jun Yang
Abstract
This paper explores the use of machine learning for estimating the selectivity of range queries in database systems. Using classic learning theory for real-valued functions based on shattering dimension, we show that the selectivity function of a range space with bounded VC-dimension is learnable. As many popular classes of queries (e.g., orthogonal range search, inequalities involving linear combination of attributes, distance-based search, etc.) represent range spaces with finite VC-dimension, our result immediately implies that their selectivity functions are also learnable. To the best of our knowledge, this is the first attempt at formally explaining the role of machine learning techniques in selectivity estimation, and complements the growing literature in empirical studies in this direction. Supplementing these theoretical results, our experimental results demonstrate that, empirically, even a basic learning algorithm with generic models is able to produce accurate predictions across settings, matching state-of-art methods designed for specific queries, and using training sample sizes commensurate with our theory.
• Information systems → Database query processing; • Theory of computation → Sample complexity and generalization bounds; Database query processing and optimization (theory).
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 1a9c69d2-ad1c-4d8d-914e-be647a3aa5e1Cited by top-tier papers8
- WISK: A Workload-aware Learned Index for Spatial Keyword QueriesYufan Sheng, Xin Cao, Yixiang Fang, Kaiqi Zhao et al.SIGMOD 2023 · 24 citations
- NeuroSketch: Fast and Approximate Evaluation of Range Aggregate Queries with Neural NetworksSepanta Zeighami, Cyrus Shahabi, Vatsal SharanSIGMOD 2023 · 9 citations
- PARQO: Penalty-Aware Robust Plan Selection in Query OptimizationHaibo Xiu, Pankaj K. Agarwal, Jun YangVLDB 2024 · 8 citations
- Theoretical Analysis of Learned Database Operations under Distribution Shift through Distribution LearnabilitySepanta Zeighami, Cyrus ShahabiICML 2024 · 5 citations
- Towards Establishing Guaranteed Error for Learned Database OperationsSepanta Zeighami, Cyrus ShahabiICLR 2024 · 4 citations
Builds on7
- Bao: Making Learned Query Optimization PracticalRyan Marcus, Parimarjan Negi, Hongzi Mao, Nesime Tatbul et al.SIGMOD 2021 · 242 citations
- Deep Unsupervised Cardinality EstimationZongheng Yang, Eric Liang, Amog Kamsetty, Chenggang Wu et al.VLDB 2020 · 206 citations
- Are We Ready For Learned Cardinality Estimation?Xiaoying Wang, Changbo Qu, Weiyuan Wu, Jiannan Wang et al.VLDB 2021 · 156 citations
- Deep Learning Models for Selectivity Estimation of Multi-Attribute QueriesShohedul Hasan, Saravanan Thirumuruganathan, Jees Augustine, Nick Koudas et al.SIGMOD 2020 · 101 citations
- QuickSel: Quick Selectivity Learning with Mixture ModelsYongjoo Park, Shucheng Zhong, Barzan MozafariSIGMOD 2020 · 66 citations
Related papers
- Consistent and Flexible Selectivity Estimation for High-Dimensional DataYaoshu Wang, Chuan Xiao, Jianbin Qin, Rui Mao et al.SIGMOD 2021 · 12 citations
- A Practical Theory of Generalization in Selectivity LearningPeizhi Wu, Haoshu Xu, Ryan Marcus, Zack IvesVLDB 2025 · 2 citations
- Fairness-Aware Range Queries for Selecting Unbiased DataSuraj Shetiya, Ian P. Swift, Abolfazl Asudeh, Gautam DasICDE 2022 · 19 citations
- Towards a Combinatorial Characterization of Bounded-Memory LearningAlon Gonen, Shachar Lovett, Michal MoshkovitzNeurIPS 2020 · 9 citations
- 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
