🤖 AI Summary
To address three key bottlenecks in GPU-accelerated databases for non-ML workloads—high random memory access overhead, insufficient acceleration for high-cardinality group-by operations, and the absence of query optimization mechanisms—this paper proposes an integrated solution. First, the GFTR technique reduces random memory access latency, achieving a 2.3× speedup. Second, a partitioned group-by algorithm tailored for high-cardinality scenarios is introduced, delivering 19.4× and 1.7× improvements for hash-based and sort-based implementations, respectively. Third, a lightweight, GPU-aware cost model coupled with an adaptive implementation selection strategy enables intelligent query optimization. The approach synergistically leverages GPU parallelism, hash-sort co-optimization, dynamic partitioning, and query-level cost modeling. Experimental evaluation demonstrates a significant reduction in the proportion of random memory accesses and yields deployable, heuristic-driven query optimization rules.
📝 Abstract
There is a growing interest in leveraging GPUs for tasks beyond ML, especially in database systems. Despite the existing extensive work on GPU-based database operators, several questions are still open. For instance, the performance of almost all operators suffers from random accesses, which can account for up to 75% of the runtime. In addition, the group-by operator which is widely used in combination with joins, has not been fully explored for GPU acceleration. Furthermore, existing work often uses limited and unrepresentative workloads for evaluation and does not explore the query optimization aspect, i.e., how to choose the most efficient implementation based on the workload. In this paper, we revisit the state-of-the-art GPU-based join and group-by implementations. We identify their inefficiencies and propose several optimizations. We introduce GFTR, a novel technique to reduce random accesses, leading to speedups of up to 2.3x. We further optimize existing hash-based and sort-based group-by implementations, achieving significant speedups (19.4x and 1.7x, respectively). We also present a new partition-based group-by algorithm ideal for high group cardinalities. We analyze the optimizations with cost models, allowing us to predict the speedup. Finally, we conduct a performance evaluation to analyze each implementation. We conclude by providing practical heuristics to guide query optimizers in selecting the most efficient implementation for a given workload.