Abstract
This paper introduces
bifocal sampling,
a new technique for estimating the size of an equi-join of two relations. Bifocal sampling classifies tuples in each relation into two groups, sparse and dense, based on the number of tuples with the same join value. Distinct estimation procedures are employed that focus on various combinations for joining tuples (e.g., for estimating the number of joining tuples that are dense in both relations). This combination of estimation procedures overcomes some well-known problems in previous schemes, enabling good estimates with no a priori knowledge about the data distribution. The estimate obtained by the bifocal sampling algorithm is proven to lie with high probability within a small constant factor of the actual join size, regardless of the skew, as long as the join size is Ω(
n
lg
n
), for relations consisting of
n
tuples. The algorithm requires a sample of size at most
O
(√
n
lg
n
). By contrast, previous algorithms using a sample of similar size may require the join size to be Ω(
n
√
n
) to guarantee an accurate estimate. Experimental results support the theoretical claims and show that bifocal sampling is practical and effective.
Publisher
Association for Computing Machinery (ACM)
Subject
Information Systems,Software
Cited by
22 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Cardinality estimation via learned dynamic sample selection;Information Systems;2023-07
2. Federated Learning on Non-IID Data Silos: An Experimental Study;2022 IEEE 38th International Conference on Data Engineering (ICDE);2022-05
3. Correlation Sketches for Approximate Join-Correlation Queries;Proceedings of the 2021 International Conference on Management of Data;2021-06-09
4. Weighted Distinct Sampling: Cardinality Estimation for SPJ Queries;Proceedings of the 2021 International Conference on Management of Data;2021-06-09
5. Network-Aware Locality Scheduling for Distributed Data Operators in Data Centers;IEEE Transactions on Parallel and Distributed Systems;2021-06-01