Saved in:
Bibliographic Details
Main Authors: Xue, Daniel, Marcus, Ryan
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2505.04153
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912570995113984
author Xue, Daniel
Marcus, Ryan
author_facet Xue, Daniel
Marcus, Ryan
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2505_04153
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Global Hash Tables Strike Back! An Analysis of Parallel GROUP BY Aggregation
Xue, Daniel
Marcus, Ryan
Databases
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.
title Global Hash Tables Strike Back! An Analysis of Parallel GROUP BY Aggregation
topic Databases
url https://arxiv.org/abs/2505.04153