在无环连接上进行泊松采样
Poisson Sampling over Acyclic Joins
AI总结:
本文提出了一种在无环连接上进行泊松采样的算法,通过随机访问索引和探针技术实现高效采样,实验表明其性能优于传统伯努利试验方法,同时展示了随机访问索引在无采样情况下的高效性。
摘要:
我们引入了在连接上进行泊松采样的问题:通过为每个连接元组执行伯努利试验,使用非均匀且元组特定的概率来计算连接查询结果的样本。我们提出了一种在无环连接上进行泊松采样的算法,其运行时间接近实例最优,为O(N + k log N),其中N是输入数据库的大小,k是结果样本的大小。该算法依赖于两个构建块:(1) 构建一个允许给定数字i随机访问第i个连接元组的随机访问索引,而无需完全物化可能较大的连接结果;(2) 通过探测此索引来构建结果样本。我们研究了使这两个组件实用所需的各种工程权衡,重点是其在列存储中的实现,并识别出两种最佳性能的替代方案。我们在真实数据上的实验表明,这两种替代方案在泊松采样中显著优于重复伯努利试验算法,同时展示了随机访问索引本身可以用于无采样情况下的Yannakakis无环连接处理算法。这表明,从查询引擎设计的角度来看,可以采用统一的基础来处理经典无环连接处理和泊松采样,两者在性能上均优于传统连接和采样算法。
英文摘要:
We introduce the problem of Poisson sampling over joins: compute a sample of the result of a join query by conceptually performing a Bernoulli trial for each join tuple, using a non-uniform and tuple-specific probability. We propose an algorithm for Poisson sampling over acyclic joins that is nearly instance-optimal, running in time O(N + k \log N) where N is the size of the input database, and k is the size of the resulting sample. Our algorithm hinges on two building blocks: (1) The construction of a random-access index that allows, given a number i, to randomly access the i-th join tuple without fully materializing the (possibly large) join result; (2) The probing of this index to construct the result sample. We study the engineering trade-offs required to make both components practical, focusing on their implementation in column stores, and identify best-performing alternatives for both. Our experiments on real-world data demonstrate that this pair of alternatives significantly outperforms the repeated-Bernoulli-trial algorithm for Poisson sampling while also demonstrating that the random-access index by itself can be used to competively implement Yannakakis' acyclic join processing algorithm when no sampling is required. This shows that, as far a query engine design is concerned, it is possible to adopt a uniform basis for both classical acyclic join processing and Poisson sampling, both without regret compared to classical join and sampling algorithms.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。