部分部分聚合
Partial Partial Aggregates
AI总结:
本文提出部分部分聚合技术,通过将聚合操作的局部计算阶段推送到分布式引擎中,减少网络shuffle操作,提升查询效率。
摘要:
我们介绍了部分部分聚合(PPA),一种用于分布式引擎的查询优化技术,仅将聚合操作的局部计算阶段推送到连接操作中。一个在连接后聚合的查询涉及两个逻辑操作,每个都需要网络shuffle。将完整的聚合(COMPUTE→DISTRIBUTE→MERGE)推送到连接下方会引入第三个shuffle。在特定情况下,当连接键包含在分组键中且连接是FK-PK时,完整的推送聚合可以消除顶层聚合,成为首选方法。在所有其他键配置中,顶层聚合必须保留,额外的shuffle是浪费的。PPA仅推送COMPUTE,实现连接前的数据减少,而无需额外的shuffle。该技术依赖于聚合的分配性质,并需要准确的NDV估计以进行基于成本的决策。
英文摘要:
We introduce partial partial aggregates (PPA), a query optimization technique for distributed engines that pushes only the local compute phase of an aggregate operation through joins. A query that aggregates after a join involves two logical operations, each requiring a network shuffle. Pushing a full aggregate (COMPUTE$\rightarrow$DISTRIBUTE$\rightarrow$MERGE) below the join introduces a third shuffle. In the specific case where the join key is included in the grouping key and the join is FK-PK, the full pushed aggregate can eliminate the top-level aggregate entirely, making it the preferred choice. In all other key configurations, the top aggregate must remain, and the extra shuffle is wasteful. A PPA pushes only COMPUTE, achieving data reduction before the join without the extra shuffle. The technique relies on the distributive property of aggregates and requires accurate NDV estimation for cost-based decisions.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。