arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1912.03443cs.DB
收藏

样本上的联接:从业者的理论指南

Joins on Samples: A Theoretical Guide for Practitioners

Dawei Huang, Dong Young Yoon, Seth Pettie, Barzan Mozafari

摘要:

尽管对近似查询处理(AQP)进行了数十年的研究,但我们对基于样本的连接的理解仍然有限,在某种程度上甚至是肤浅的。社区中的共同信念是加入随机样本是徒劳的。这种信念主要是基于早期的结果,表明两个均匀样本的连接不是原始连接的独立样本,并且它会导致二次方更少的输出元组。然而,不幸的是,这一结果对从业者面临的关键问题几乎没有适用性。例如,成功度量通常是最终近似的精度,而不是输出基数。此外,还有许多非均匀采样策略可以采用。在所有这些设置中,对联接进行采样仍然是徒劳的吗?如果不是,在每种情况下最好的抽样策略是什么?据我们所知,没有正式的研究回答这些问题。本文旨在提高我们对基于样本的连接的理解,并为实践者构建和使用真实世界的AQP系统提供指导。我们研究的限制,离线样本近似连接查询:给定一个离线采样预算,以及可以近似连接两个表?我们回答这个问题的两个成功指标:输出大小和估计方差。我们表明,最大限度地提高输出规模是很容易的,而有一个信息理论的下限上的最低方差可实现的任何抽样策略。然后,我们定义了一个混合抽样方案,捕获分层,宇宙,和伯努利抽样的所有组合,并表明,我们的最佳参数,该方案达到了理论下限内的一个常数因子。由于计算这些最佳参数需要在整个网络中进行洗牌统计,我们还提出了一个分散的变体,其中每个节点使用最小的统计数据自主行动。

英文摘要:

Despite decades of research on approximate query processing (AQP), 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. However, unfortunately, this 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 real-world 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 where each node acts autonomously using minimal statistics.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑