Lune

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 Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Robust External Hash Aggregation in the Solid State Age cites These Rows Are Made for Sorting and That's Just What We'll Do
  • These Rows Are Made for Sorting and That's Just What We'll Do cites To Partition, or Not to Partition, That is the Join Question in a Real System
Builds onCited byLeft to right by year; the more cited, the higher.

Builds on5

  1. To Partition, or Not to Partition, That is the Join Question in a Real SystemMaximilian Bandle, Jana Giceva, Thomas NeumannSIGMOD 2021 · 43 citations
  2. Robust External Hash Aggregation in the Solid State AgeLaurens Kuiper, Peter Boncz, Hannes MühleisenICDE 2024 · 7 citations
  3. These Rows Are Made for Sorting and That's Just What We'll DoLaurens Kuiper, Hannes MühleisenICDE 2023 · 6 citations
  4. Design Trade-offs for a Robust Dynamic Hybrid Hash JoinShiva Jahangiri, Michael J. Carey, Johann-Christoph FreytagVLDB 2022 · 6 citations
  5. FSST: Fast Random Access String CompressionPeter Boncz, Thomas Neumann, Viktor LeisVLDB 2020

Related papers

  1. Data Chunk Compaction in Vectorized ExecutionYiming Qiao, Huanchen ZhangSIGMOD 2025 · 2 citations
  2. Debunking the Myth of Join Ordering: Toward Robust SQL AnalyticsJunyi Zhao, Kai Su, Yifei Yang, Xiangyao Yu et al.SIGMOD 2025 · 13 citations
  3. High-Performance Query Processing with NVMe Arrays: Spilling without Killing PerformanceMaximilian Kuschewski, Jana Giceva, Thomas Neumann, Viktor LeisSIGMOD 2025 · 11 citations
  4. 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
  5. Robust Predicate Transfer with Dynamic ExecutionYiming Qiao, Peter Boncz, Huanchen ZhangVLDB 2026 · 2 citations
Dusk over the sea between two cliffs drawn in fine vertical lines