Join on Samples: A Theoretical Guide for Practitioners
Dawei Huang, Dong Young Yoon, Seth Pettie, Barzan Mozafari
摘要
Despite decades of research on AQP (approximate query processing), our understanding of sample-based joins has remained limited and, to some extent, even superficial. The common belief in the community is that joining random samples is futile. This belief is largely based on an early result showing that the join of two uniform samples is not an independent sample of the original join, and that it leads to quadratically fewer output tuples. Unfortunately, this early result has little applicability to the key questions practitioners face. For example, the success metric is often the final approximation's accuracy, rather than output cardinality. Moreover, there are many non-uniform sampling strategies that one can employ. Is sampling for joins still futile in all of these settings? If not, what is the best sampling strategy in each case? To the best of our knowledge, there is no formal study answering these questions.
This paper aims to improve our understanding of sample-based joins and offer a guideline for practitioners building and using realworld AQP systems. We study limitations of offline samples in approximating join queries: given an offline sampling budget, how well can one approximate the join of two tables? We answer this question for two success metrics: output size and estimator variance. We show that maximizing output size is easy, while there is an information-theoretical lower bound on the lowest variance achievable by any sampling strategy. We then define a hybrid sampling scheme that captures all combinations of stratified, universe, and Bernoulli sampling, and show that this scheme with our optimal parameters achieves the theoretical lower bound within a constant factor. Since computing these optimal parameters requires shuffling statistics across the network, we also propose a decentralized variant in which each node acts autonomously using minimal statistics. We also empirically validate our findings on popular SQL and AQP engines.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了每一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper6
- Instance-Optimized Data Layouts for Cloud Analytics WorkloadsJialin Ding, Umar Farooq Minhas, Badrish Chandramouli, Chi Wang 等SIGMOD 2021 · 被引用 37 次
- Towards Observability for Production Machine Learning Pipelines [Vision]Shreya Shankar, Aditya G. ParameswaranVLDB 2022 · 被引用 21 次
- Aggregate Queries on Knowledge Graphs: Fast Approximation with Semantic-aware SamplingYuxiang Wang, Arijit Khan, Xiaoliang Xu, Jiahui Jin 等ICDE 2022 · 被引用 20 次
- Towards Distribution-aware Query Answering in Data MarketsAbolfazl Asudeh, Fatemeh NargesianVLDB 2022 · 被引用 17 次
- One Size Does Not Fit All: A Bandit-Based Sampler Combination Framework with Theoretical GuaranteesJinglin Peng, Bolin Ding, Jiannan Wang, Kai Zeng 等SIGMOD 2022 · 被引用 7 次
它引用的顶会 Paper1
相关 Paper
- Enabling Adaptive Sampling for Intra-Window Join: Simultaneously Optimizing Quantity and QualityXilin Tang, Feng Zhang, Shuhao Zhang, Yani Liu 等SIGMOD 2025 · 被引用 1 次
- Weighted Distinct Sampling: Cardinality Estimation for SPJ QueriesYuan Qiu, Yilei Wang, Ke Yi, Feifei Li 等SIGMOD 2021 · 被引用 10 次
- QDBO: A Real-time Quantum-augmented Database System OptimizerHanwen Liu, Abhishek Kumar, Federico M. Spedalieri, Ibrahim SabekVLDB 2026 · 被引用 3 次
- Improved Correlated Sampling for Join Size EstimationTaiNing Wang, Chee-Yong ChanICDE 2020 · 被引用 19 次
- Accelerating Approximate Analytical Join Queries over Unstructured Data with Statistical GuaranteesYuxuan Zhu, Tengjun Jin, Chenghao Mo, Daniel KangSIGMOD 2026 · 被引用 1 次
