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

基于生成树的查询计划枚举

Spanning Tree-based Query Plan Enumeration

Yesdaulet Izenov, Asoke Datta, Brian Tsan, Abylay Amanbayev, Florin Rusu

AI总结:

本研究将最优查询计划查找转化为低代价生成树查找问题,提出结合Prim与Kruskal算法的ESTE策略,在计划质量、优化时间一致性及大查询鲁棒性上优于现有方案,可低成本维持优化器鲁棒性。

摘要:

在本研究中,我们将最优查询计划查找问题定义为低代价生成树的查找问题。该方法支持利用一系列生成树算法,从而能够系统探索连接图上的计划搜索空间。借助生成树算法的多项式时间复杂度,我们提出了集成生成树枚举(Ensemble Spanning Tree Enumeration,ESTE)策略。ESTE 结合使用 Prim 算法和 Kruskal 算法这两种传统生成树算法,以提升查询优化器的鲁棒性。在 ESTE 中,通过探索搜索空间的不同区域来枚举多个查询计划,这使得 ESTE 成为穷举枚举策略和启发式枚举策略之间的一种中间策略。我们证明,ESTE 在为大型查询识别高效查询计划方面更具鲁棒性。在数据修改和工作负载需求增加的场景下,我们认为我们的方法可作为一种成本更低的替代方案,通过集成额外的生成树算法来维持优化器的鲁棒性,而非将优化器完全更换为另一种计划枚举算法。实验评估表明,ESTE 在识别同等最优计划的同时,在计划质量和优化时间方面比现有方案具备更好的一致性。

英文摘要:

In this work, we define the problem of finding an optimal query plan as finding spanning trees with low costs. This approach empowers the utilization of a series of spanning tree algorithms, thereby enabling systematic exploration of the plan search space over a join graph. Capitalizing on the polynomial time complexity of spanning tree algorithms, we present the Ensemble Spanning Tree Enumeration (ESTE) strategy. ESTE employs two conventional spanning tree algorithms, Prim's and Kruskal's, together to enhance the robustness of the query optimizer. In ESTE, multiple query plans are enumerated exploring different areas of the search space. This positions ESTE as an intermediate strategy between exhaustive and heuristic enumeration strategies. We show that ESTE is more robust in identifying efficient query plans for large queries. In the case of data modifications and workload demand increase, we believe that our approach can be a cheaper alternative to maintain optimizer robustness by integrating additional spanning tree algorithms rather than completely changing the optimizer to another plan enumeration algorithm. The experimental evaluation shows that ESTE achieves better consistency in plan quality and optimization time than existing solutions while identifying similarly optimal plans.

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

↑