Most research on query optimization has centered on binary join algorithms like hash join and sort-merge join. However, recent years have seen growing interest in theoretically optimal algorithms, notably Yannakakis' algorithm. These algorithms rely on join trees, which differ from the operator trees for binary joins and require new optimization techniques. We propose three approaches to constructing join trees for acyclic queries. First, we give an algorithm to enumerate all join trees of an alpha-acyclic query by edits with amortized constant delay, which forms the basis of a cost-based optimizer for acyclic joins. Second, we show that the Maximum Cardinality Search algorithm by Tarjan and Yannakakis constructs a unique shallowest join tree, rooted at any relation, for a Berge-acyclic query; this tree enables parallel execution of large join queries. Finally, we prove that any connected left-deep linear plan for a gamma-acyclic query can be converted into a join tree by a simple algorithm, allowing reuse of optimization infrastructure developed for binary joins.


翻译:大多数关于查询优化的研究都集中在哈希连接和排序合并连接等二元连接算法上。然而,近年来,对理论最优算法的兴趣日益增长,特别是Yannakakis算法。这些算法依赖于连接树,连接树不同于二元连接的运算符树,需要新的优化技术。我们提出了三种构建无环查询连接树的方法。首先,我们给出了一种算法,通过摊销常数延迟的编辑操作来枚举α-无环查询的所有连接树,这构成了基于成本的无环连接优化器的基础。其次,我们证明了Tarjan和Yannakakis提出的最大基数搜索算法能为Berge-无环查询构建一棵以任意关系为根的、唯一的最浅连接树;该树支持大规模连接查询的并行执行。最后,我们证明任何γ-无环查询的连通左深线性计划都可以通过一个简单算法转换为连接树,从而允许重用为二元连接开发的优化基础设施。

0
下载
关闭预览

相关内容

在数学和计算机科学之中,算法(Algorithm)为一个计算的具体步骤,常用于计算、数据处理和自动推理。精确而言,算法是一个表示为有限长列表的有效方法。算法应包含清晰定义的指令用于计算函数。 来自维基百科: 算法
《用于代码弱点识别的 LLVM 中间表示》CMU
专知会员服务
14+阅读 · 2022年12月12日
【CVPR2020-旷视】DPGN:分布传播图网络的小样本学习
专知会员服务
28+阅读 · 2020年4月1日
【NeurIPS2019】图变换网络:Graph Transformer Network
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
9+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Arxiv
0+阅读 · 1月6日
VIP会员
相关VIP内容
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
9+阅读 · 2015年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员