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

全局哈希表反击!并行GROUP BY聚合分析

Global Hash Tables Strike Back! An Analysis of Parallel GROUP BY Aggregation

Daniel Xue, Ryan Marcus

AI总结:

针对分析型数据库的分组聚合计算问题,本文提出定制化共享并发哈希表的全并发聚合策略,实验证明其在morsel驱动系统中性能可匹配或超越分区方法,并给出数据库实现的实用指南。

摘要:

在现代架构上高效计算分组聚合(即GROUP BY)对分析型数据库系统至关重要。当前引擎中基于哈希的方法主要采用分区策略,即按键值对输入数据进行分区,使特定键的每一行都被发送到同一线程。本文重新研究了一种更简单的策略:使用共享哈希表的全并发聚合技术。虽然采用通用并发哈希表的方法通常被认为性能不如基于分区的方法,但我们认为关键在于针对分组聚合这一特定任务定制并发哈希表。通过在合成工作负载(变化的键基数、数据偏斜度和线程数)上开展实验,我们证明在morsel驱动的系统中,专门构建的并发哈希表能够匹配甚至超越基于分区的技术。我们还分析了两种技术的运行特性,包括扩容开销和内存压力。在此过程中,我们为数据库实现者总结出了实用指南。总体而言,我们的分析表明全并发分组聚合是分区方法的可行替代方案。

英文摘要:

Efficiently computing group aggregations (i.e., GROUP BY) on modern architectures is critical for analytic database systems. Hash-based approaches in today's engines predominantly use a partitioned approach, in which incoming data is partitioned by key values so that every row for a particular key is sent to the same thread. In this paper, we revisit a simpler strategy: a fully concurrent aggregation technique using a shared hash table. While approaches using general-purpose concurrent hash tables have generally been found to perform worse than partitioning-based approaches, we argue that the key ingredient is customizing the concurrent hash table for the specific task of group aggregation. Through experiments on synthetic workloads (varying key cardinality, skew, and thread count), we demonstrate that in morsel-driven systems, a purpose-built concurrent hash table can match or surpass partitioning-based techniques. We also analyze the operational characteristics of both techniques, including resizing costs and memory pressure. In the process, we derive practical guidelines for database implementers. Overall, our analysis indicates that fully concurrent group aggregation is a viable alternative to partitioning.

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

↑