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.


翻译:我们引入了连接上的泊松采样问题:通过对每个连接元组概念上执行伯努利试验(使用非均匀且元组特定的概率)来计算连接查询结果的样本。我们提出了一种用于无环连接上泊松采样的算法,该算法近乎实例最优,运行时间为 O(N + k \log N),其中 N 是输入数据库的大小,k 是所得样本的大小。我们的算法依赖于两个构建模块:(1) 构建一个随机访问索引,该索引允许给定一个数字 i,在不完全物化(可能很大的)连接结果的情况下随机访问第 i 个连接元组;(2) 探测此索引以构建结果样本。我们研究了使这两个组件实用化所需的工程权衡,重点关注它们在列存储中的实现,并为两者确定了性能最佳的替代方案。我们在真实世界数据上的实验表明,这对替代方案显著优于用于泊松采样的重复伯努利试验算法,同时也证明了随机访问索引本身可以用于在不需要采样时竞争性地实现 Yannakakis 的无环连接处理算法。这表明,就查询引擎设计而言,可以为经典的无环连接处理和泊松采样采用统一的基础,两者与经典的连接和采样算法相比都无需遗憾。

0
下载
关闭预览

相关内容

在数学和计算机科学之中,算法(Algorithm)为一个计算的具体步骤,常用于计算、数据处理和自动推理。精确而言,算法是一个表示为有限长列表的有效方法。算法应包含清晰定义的指令用于计算函数。 来自维基百科: 算法
和积网络综述论文,Sum-product networks: A survey,24页pdf
专知会员服务
24+阅读 · 2020年4月3日
CNN已老,GNN来了!清华大学孙茂松组一文综述GNN
数据分析师应该知道的16种回归方法:泊松回归
数萃大数据
35+阅读 · 2018年9月13日
用PyTorch实现各种GANs(附论文和代码地址)
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Arxiv
0+阅读 · 3月16日
Arxiv
0+阅读 · 3月8日
VIP会员
相关VIP内容
和积网络综述论文,Sum-product networks: A survey,24页pdf
专知会员服务
24+阅读 · 2020年4月3日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员