Memory-Efficient Key/Foreign-Key Join Size Estimation via Multiplicity and Intersection Size
Magnus Müller, Daniel Flachs, Guido Moerkotte
Abstract
Join size estimation plays a crucial role in query optimization. In this paper, we present a technique to estimate the size of a key/foreign-key join of two filtered relations. We build on a model by Allen Van Gelder, in which there is no notion of join selectivity. Instead, the size of a join is estimated as a multiple of the intersection size of the join attributes. We present both a data structure to approximate the number of distinct values in a join attribute after a filter operation, and formulas to estimate the factor by which a join size exceeds the intersection size. In addition, we evaluate three existing intersection size estimation methods that are based on HyperLogLog sketches, to which our approach is closely linked. For both real-world and generated data sets, our estimator competes well, in terms of accuracy and memory footprint, against several industry-strength and state-of-the-art join size estimation methods. In particular, our experiments indicate that our approach is less prone to heavy underestimates.
Ask about this paper
Ask your agent about it.
Lune has read the top-tier papers around this one, so every answer names the papers it rests on.
Your agent calls
Lunesearch_papers
Free to start. No credit card required.
Terminal
Install the CLIlune papers get f92adf25-54c1-4065-88f7-98e26d9f9667Cited by top-tier papers2
- Index Intersection for High-Dimensional Range QueriesMaximilian Berens, Jens TeubnerVLDB 2026
- Evaluating Methods for Efficient Entity Count EstimationJerin George Mathew, Donatella Firmani, Divesh SrivastavaVLDB 2025
Related papers
- SetSketch: Filling the Gap between MinHash and HyperLogLogOtmar ErtlVLDB 2021 · 17 citations
- FactorJoin: A New Cardinality Estimation Framework for Join QueriesZiniu Wu, Parimarjan Negi, Mohammad Alizadeh, Tim Kraska et al.SIGMOD 2023 · 54 citations
- Weighted Distinct Sampling: Cardinality Estimation for SPJ QueriesYuan Qiu, Yilei Wang, Ke Yi, Feifei Li et al.SIGMOD 2021 · 10 citations
- KHyperLogLog: Estimating Reidentifiability and Joinability of Large Data at ScalePern Hui Chia, Damien Desfontaines, Irippuge Milinda Perera, Daniel Simmons-Marengo et al.S&P 2019 · 18 citations
- Improved Correlated Sampling for Join Size EstimationTaiNing Wang, Chee-Yong ChanICDE 2020 · 19 citations
