DYOD 2026 · Group 5

A hash-based aggregate operator

Partition-first, cache-resident aggregation for high cardinality

Julian Hackenberg · Victor Lindow · Maximilian Speer

L2

Execution paths

Σ

Ungrouped

Low cardinality

focus

High cardinality

Partitioning for cache residency

input stream hash table L2 L2 ✓ L2 ✓ L2 ✓ L2 ✓ L2 ✓ L2 ✓

Phase 1 · Plan

keys H L L Ĉ ≈ 0 C = 10 M → P = 2048 C = 1 M → P = 128

Phase 2 · Scatter

input M₀ M₁ M₂ shared cursor 0 P₀ P₁ P₂ P₃ W₀ W₁ W₂

Phase 3 · Merge

P₀ P₁ P₂ P₃ P₄ P₅ P₆ P₇ shared cursor 0 W₀ accumulator cache ✓ W₁ accumulator cache ✓ W₂ accumulator cache ✓ output large partition C₀ C₁ C₂

What the prototype supports

i32 only

≤4 key columns

Σ

Sum / Max

How we measured

Query: SELECT k, SUM(v), MAX(v) FROM t GROUP BY k

kv
742
318
79
155

Random numbers

Development VM

16 cores

Performance

runtime (ms · log scale)

Open work

Open questions

Strings

Key widths

Compression

Materializing packed keys

Roadmap

  1. Aggregate without GROUP BY
  2. Design validated
  3. COUNT(DISTINCT)
  4. Other segment types
  5. Optimizations

DYOD 2026 · Group 5

A hash-based aggregate operator

Partition-first, cache-resident aggregation for high cardinality

Julian Hackenberg · Victor Lindow · Maximilian Speer

L2