Saving Private Hash Join
Laurens Kuiper, Paul Gross, Peter Boncz, Hannes Mühleisen
Abstract
Modern analytical database systems offer high-performance inmemory joins. However, if the build side of a join does not fit in RAM, performance degrades sharply due to switching to traditional external join algorithms such as sort-merge. In streaming query execution, this problem is worsened if multiple joins are evaluated simultaneously, as the database system must decide how to allocate memory to each join, which can greatly affect performance. We revisit larger-than-memory join processing on modern hardware, aiming for robust performance that avoids a "performance cliff" when memory runs out, even in query plans with many joins. To achieve this, we propose three techniques. First, an adaptive, external hash join algorithm that stores temporary data in a unified buffer pool that oversees temporary and persistent data. Second, an optimizer that creates expressions to compress columns at runtime, reducing the size of materialized temporary data. Third, a strategy for dynamically managing the memory of concurrent operators during query execution to reduce spilling. We integrate these techniques into DuckDB and experimentally show that when processing memory-intensive join query plans, our implementation gracefully degrades performance as the space requirement exceeds the memory limit. This greatly increases the size of datasets that can be processed on economical hardware.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext dc9b0694-9a9d-4532-b40f-aa81d769c6a2Builds on5
- To Partition, or Not to Partition, That is the Join Question in a Real SystemMaximilian Bandle, Jana Giceva, Thomas NeumannSIGMOD 2021 · 43 citations
- Robust External Hash Aggregation in the Solid State AgeLaurens Kuiper, Peter Boncz, Hannes MühleisenICDE 2024 · 7 citations
- These Rows Are Made for Sorting and That's Just What We'll DoLaurens Kuiper, Hannes MühleisenICDE 2023 · 6 citations
- Design Trade-offs for a Robust Dynamic Hybrid Hash JoinShiva Jahangiri, Michael J. Carey, Johann-Christoph FreytagVLDB 2022 · 6 citations
- FSST: Fast Random Access String CompressionPeter Boncz, Thomas Neumann, Viktor LeisVLDB 2020
Related papers
- Data Chunk Compaction in Vectorized ExecutionYiming Qiao, Huanchen ZhangSIGMOD 2025 · 2 citations
- Debunking the Myth of Join Ordering: Toward Robust SQL AnalyticsJunyi Zhao, Kai Su, Yifei Yang, Xiangyao Yu et al.SIGMOD 2025 · 13 citations
- High-Performance Query Processing with NVMe Arrays: Spilling without Killing PerformanceMaximilian Kuschewski, Jana Giceva, Thomas Neumann, Viktor LeisSIGMOD 2025 · 11 citations
- One Join Order Does Not Fit All: Reducing Intermediate Results with Per-Split Query PlansYujun He, Hangdong Zhao, Simon Frisk, Yifei Yang et al.VLDB 2026
- Robust Predicate Transfer with Dynamic ExecutionYiming Qiao, Peter Boncz, Huanchen ZhangVLDB 2026 · 2 citations
