Cardinality Estimation for Having-Clauses
Guido Moerkotte
2025Year
Abstract
We present several methods for estimating the result cardinality of single table queries with a having clause. More specifically, we provide cardinality estimates for predicates using the aggregate functions count(*), sum(B), avg(B), min(B), and max(B). We do so for queries with and without a where-clause. Finally, we show how to handle conjunctions and disjunctions in the having-clause.
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 ff7d05a6-0480-4885-b962-b679dd1c984aBuilds on3
- Deep Unsupervised Cardinality EstimationZongheng Yang, Eric Liang, Amog Kamsetty, Chenggang Wu et al.VLDB 2020 · 206 citations
- FLAT: Fast, Lightweight and Accurate Method for Cardinality EstimationRong Zhu, Ziniu Wu, Yuxing Han, Kai Zeng et al.VLDB 2021 · 120 citations
- A Practical Approach to Groupjoin and Nested AggregatesPhilipp Fent, Thomas NeumannVLDB 2021 · 11 citations
Related papers
- 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
- Analyzing the Impact of Cardinality Estimation on Execution Plans in Microsoft SQL ServerKukjin Lee, Anshuman Dutt, Vivek R. Narasayya, Surajit ChaudhuriVLDB 2023 · 26 citations
- ACE: A Cardinality Estimator for Set-Valued QueriesYufan Sheng, Xin Cao, Kaiqi Zhao, Yixiang Fang et al.VLDB 2025
- LpBound: Pessimistic Cardinality Estimation Using ℓp-Norms of Degree SequencesHaozhe Zhang, Christoph Mayer, Mahmoud Abo Khamis, Dan Olteanu et al.SIGMOD 2025 · 7 citations
- Weighted Distinct Sampling: Cardinality Estimation for SPJ QueriesYuan Qiu, Yilei Wang, Ke Yi, Feifei Li et al.SIGMOD 2021 · 10 citations
