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

大规模并行连接的高效优化

Efficient Massively Parallel Join Optimization for Large Queries

Riccardo Mancini, Srinivas Karthik, Bikash Chandra, Vasilis Mageirakos, Anastasia Ailamaki

摘要:

现代数据分析工作负载通常需要在大量表上运行查询。一个最佳的查询计划,这样的查询是至关重要的,能够在可接受的时间范围内运行这些查询。但是,对于涉及许多表的查询,查找最佳连接顺序成为查询优化的瓶颈。由于连接顺序优化的指数性质,优化器在阈值数量的表之后求助于启发式解决方案。我们的目标有两个方面:(a)减少生成最优计划的优化时间;(b)提高启发式解决方案的质量。在本文中,我们提出了一种新的大规模并行算法,MPDP,可以有效地修剪大搜索空间(通过一种新的计划枚举技术),同时利用现代硬件(例如:GPU)提供的大规模并行。当使用PostgreSQL对真实世界的基准查询进行评估时,与大型分析查询的最新技术相比,MPDP至少快了一个数量级。因此,我们能够在PostgreSQL中以相同的时间预算将扩展性回退限制从12个关系增加到25个关系。此外,为了处理查询,甚至更大数量的表,我们增加MPDP一个众所周知的启发式,IDP $_2$(迭代DP版本2)和一个新的启发式UnionDP。通过系统地探索更大的搜索空间,这些算法提供的查询计划比最先进的技术便宜7倍,同时计算速度更快。

英文摘要:

Modern data analytical workloads often need to run queries over a large number of tables. An optimal query plan for such queries is crucial for being able to run these queries within acceptable time bounds. However, with queries involving many tables, finding the optimal join order becomes a bottleneck in query optimization. Due to the exponential nature of join order optimization, optimizers resort to heuristic solutions after a threshold number of tables. Our objective is two fold: (a) reduce the optimization time for generating optimal plans; and (b) improve the quality of the heuristic solution. In this paper, we propose a new massively parallel algorithm, MPDP, that can efficiently prune the large search space (via a novel plan enumeration technique) while leveraging the massive parallelism offered by modern hardware (Eg: GPUs). When evaluated on real-world benchmark queries with PostgreSQL, MPDP is at least an order of magnitude faster compared to state-of-the-art techniques for large analytical queries. As a result, we are able to increase the heuristic-fall-back limit from 12 relations to 25 relations with same time budget in PostgreSQL. Also, in order to handle queries with even larger number of tables, we augment MPDP to a well known heuristic, IDP$_2$ (iterative DP version 2) and a novel heuristic UnionDP. By systematically exploring a much larger search space, these heuristics provides query plans that are up to 7 times cheaper as compared to the state-of-the-art techniques while being faster to compute.

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

↑