arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2510.25684cs.DB
收藏

一种连接顺序并不通用:通过逐分片查询计划减少中间结果

One Join Order Does Not Fit All: Reducing Intermediate Results with Per-Split Query Plans

University of Wisconsin-Madison(威斯康星大学麦迪逊分校);Southern University of Science and Technology(南方科技大学);Microsoft Gray Systems Lab(微软灰系统实验室)

Yujun He, Hangdong Zhao, Simon Frisk, Yifei Yang, Kevin Kristensen, Paraschos Koutris, Xiangyao Yu

AI总结:

针对环查询多连接处理中间结果过大的难题,提出将分片作为一等算子的SplitJoin框架,适配不同数据分区使用不同查询计划,在DuckDB和Umbra上均实现了查询完成数、运行速度与中间结果规模的显著优化。

摘要:

最小化中间结果对于高效的多连接查询处理至关重要。尽管具有开创性的Yannakakis算法为无环查询提供了有力保障,但环查询仍然是一个公开的挑战。本文提出SplitJoin框架,该框架将分片(split)作为一等查询算子引入。通过将输入表划分为重部分和轻部分,SplitJoin允许不同的数据分区使用不同的查询计划,目标是利用现有的二元连接引擎减小中间结果规模。我们系统地探索了基于分片的优化的设计空间,包括阈值选择、分片策略以及分片后的连接排序。SplitJoin作为DuckDB和Umbra的前端实现,取得了显著的性能提升:在DuckDB上,SplitJoin完成了43条社交网络查询(原生实现仅完成29条),平均运行速度提升2.1倍,中间结果平均缩小7.9倍(最高分别达13.6倍和74倍);在Umbra上,它完成了45条查询(原生实现为35条),平均加速1.3倍,中间结果平均缩小1.2倍(最高分别达6.1倍和2.1倍)。

英文摘要:

Minimizing intermediate results is critical for efficient multi-join query processing. Although the seminal Yannakakis algorithm offers strong guarantees for acyclic queries, cyclic queries remain an open challenge. In this paper, we propose SplitJoin, a framework that introduces split as a first-class query operator. By partitioning input tables into heavy and light parts, SplitJoin allows different data partitions to use distinct query plans, with the goal of reducing intermediate sizes using existing binary join engines. We systematically explore the design space for split-based optimizations, including threshold selection, split strategies, and join ordering after splits. Implemented as a front-end to DuckDB and Umbra, SplitJoin achieves substantial improvements: on DuckDB, SplitJoin completes 43 social network queries (vs. 29 natively), achieving 2.1x faster runtime and 7.9x smaller intermediates on average (up to 13.6x and 74x, respectively); on Umbra, it completes 45 queries (vs. 35), achieving 1.3x speedups and 1.2x smaller intermediates on average (up to 6.1x and 2.1x, respectively).

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

↑