Skip to content

perf(hash-join): eliminate intermediate array allocations in probe-side collision filter#23209

Open
LiaCastaneda wants to merge 4 commits into
apache:mainfrom
LiaCastaneda:perf/hash-join-no-take-in-probe
Open

perf(hash-join): eliminate intermediate array allocations in probe-side collision filter#23209
LiaCastaneda wants to merge 4 commits into
apache:mainfrom
LiaCastaneda:perf/hash-join-no-take-in-probe

Conversation

@LiaCastaneda

@LiaCastaneda LiaCastaneda commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

When HashJoinExec builds the probe the hash table, it collects all candidate (build_idx, probe_idx) pairs and then rechecks every pair with equal_rows_arr (shows in the profile, taking 20% of the query CPU) to filter out hash collisions. This recheck materializes intermediate Arrow arrays sized to the number of matched pairs (take + eq_dyn_null + FilterBuilder), making it O(matched_pairs) in both allocations and comparisons.

For high-fanout joins (many build rows per distinct key), matched_pairs = probe_rows × fanout. At fanout 78× over 2.3M probe rows this produces ~176M pairs — and the recheck runs on all of them, even though nearly all pass.

This cost is most visible when:

  • The build side has duplicate keys
  • The join output is large (high fanout × large probe side)
  • Hash partition skew concentrates most matched pairs onto a single partition, making the per-partition allocation cost directly observable as query latency

What changes are included in this PR?

Step 1: Replace equal_rows_arr with an in-place JoinKeyComparator loop , eliminating the O(matched_pairs) Arrow allocations in the fallback path.

Step 2: At build time, scan the next chain once to detect whether the map is collision-free (all adjacent linked pairs share the same key). If so, the probe phase checks once per run of consecutive same-probe-idx pairs and accepts the entire run.


Are these changes tested?

Existing tests pass, I also added some tests for the new function that detects hash collisions detect_key_collisions

I did some profiling on the added Q23 (this query replicates the level of skew where just 1 partition does the entire join):

image image

We can see the CPU for the HashJoin was cut in half.
Also the benchmarks results show Q23 runs ~x2.5 times faster:

  • main: 1.01s
  • this PR: 0.42s

Are there any user-facing changes?

No

@LiaCastaneda LiaCastaneda changed the title perf(hash-join): replace equal_rows_arr with JoinKeyComparator in pro… perf(hash-join): eliminate intermediate array allocations in probe-side collision filter Jun 26, 2026
@github-actions github-actions Bot added the physical-plan Changes to the physical-plan crate label Jun 26, 2026
@LiaCastaneda
LiaCastaneda force-pushed the perf/hash-join-no-take-in-probe branch from ccfebda to 06503c2 Compare June 29, 2026 13:03
@LiaCastaneda
LiaCastaneda force-pushed the perf/hash-join-no-take-in-probe branch from 06503c2 to e3b8172 Compare June 29, 2026 13:22
/// Example — keys `["cat", "cat", "dog"]`, next `[0, 1, 2]`:
/// row 1 → prev 0: "cat"=="cat" ✓
/// row 2 → prev 1: "dog"!="cat" → return true (collision found)
fn detect_key_collisions<T>(

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked in the other engine (Trino) and there when a build row is inserted, Trino only inserts rows that share the same key, so by construction, every chain is already "pure" and hash collisions are not possible.
This happens because Trino uses a hash table that resolves key equality at insert time. DataFusion's update_from_iter only receives hashes and row indices (it has no access to key values) so it chains all rows in the same hash bucket together regardless of whether they share a key or not.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note doing the same in DF would be non trivial because it would require modifying update_from_iter trait signature to accept key columns alongside the hashes, and updating all call sites accordingly.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I think this could be faster at least for single column keys / with type / join type specialization.

The reason I think we / I pursued this design is that take is (much) faster than individual dispatch (and most recent literature also seems to implement it in a separate pass) and probably easier to implement all the join types.

Also combining it with filter is a bit easier with the indices -> filter indices -> collision check, etc.

@LiaCastaneda
LiaCastaneda marked this pull request as ready for review June 29, 2026 15:24
@LiaCastaneda
LiaCastaneda force-pushed the perf/hash-join-no-take-in-probe branch from c3b077f to d647868 Compare June 30, 2026 10:12
@Dandandan

Copy link
Copy Markdown
Contributor

run benchmark tpch10 tpcds

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4847008791-759-tnjzq 6.12.85+ #1 SMP Mon May 11 08:17:35 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected

Comparing perf/hash-join-no-take-in-probe (d647868) to bde8e5b (merge-base) diff using: tpcds
Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4847008791-758-krrq7 6.12.85+ #1 SMP Mon May 11 08:17:35 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected

Comparing perf/hash-join-no-take-in-probe (d647868) to bde8e5b (merge-base) diff using: tpch10
Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Instance: c4a-highmem-16 (12 vCPU / 65 GiB)

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Details

Comparing HEAD and perf_hash-join-no-take-in-probe
--------------------
Benchmark tpch_sf10.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┓
┃ Query     ┃                                  HEAD ┃       perf_hash-join-no-take-in-probe ┃       Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━┩
│ QQuery 1  │     310.74 / 312.42 ±1.54 / 315.33 ms │     311.20 / 313.33 ±1.25 / 314.92 ms │    no change │
│ QQuery 2  │     110.16 / 113.39 ±1.92 / 115.90 ms │     110.40 / 115.43 ±3.46 / 120.16 ms │    no change │
│ QQuery 3  │     232.79 / 233.78 ±0.75 / 234.97 ms │     234.54 / 238.65 ±3.08 / 243.56 ms │    no change │
│ QQuery 4  │     111.30 / 112.95 ±0.91 / 113.90 ms │     112.47 / 114.04 ±1.77 / 116.99 ms │    no change │
│ QQuery 5  │     351.80 / 360.51 ±8.39 / 375.51 ms │     360.17 / 370.34 ±7.67 / 383.44 ms │    no change │
│ QQuery 6  │     124.78 / 126.34 ±1.56 / 128.90 ms │     127.31 / 129.44 ±3.31 / 136.04 ms │    no change │
│ QQuery 7  │     459.63 / 466.82 ±6.25 / 477.35 ms │    496.01 / 515.37 ±16.13 / 543.07 ms │ 1.10x slower │
│ QQuery 8  │     381.70 / 387.42 ±3.51 / 392.20 ms │     387.71 / 393.75 ±4.86 / 399.17 ms │    no change │
│ QQuery 9  │     553.39 / 561.75 ±8.38 / 577.49 ms │     564.82 / 575.25 ±7.66 / 588.58 ms │    no change │
│ QQuery 10 │     304.20 / 313.92 ±6.57 / 322.68 ms │     310.61 / 315.94 ±4.60 / 322.89 ms │    no change │
│ QQuery 11 │        83.29 / 88.89 ±4.10 / 93.56 ms │        93.41 / 97.04 ±2.25 / 99.52 ms │ 1.09x slower │
│ QQuery 12 │     175.18 / 179.05 ±4.05 / 186.91 ms │    181.26 / 187.99 ±10.75 / 209.24 ms │    no change │
│ QQuery 13 │     290.37 / 294.17 ±5.74 / 305.60 ms │     317.68 / 320.13 ±3.44 / 326.94 ms │ 1.09x slower │
│ QQuery 14 │     172.75 / 178.52 ±5.38 / 186.37 ms │     173.82 / 179.73 ±6.29 / 188.35 ms │    no change │
│ QQuery 15 │     307.17 / 311.97 ±3.38 / 316.47 ms │     308.23 / 312.20 ±4.35 / 320.51 ms │    no change │
│ QQuery 16 │        79.57 / 83.14 ±2.70 / 87.33 ms │        81.07 / 83.43 ±1.93 / 86.18 ms │    no change │
│ QQuery 17 │     642.80 / 655.96 ±9.37 / 667.17 ms │     635.77 / 641.72 ±5.12 / 648.90 ms │    no change │
│ QQuery 18 │ 2122.73 / 2145.30 ±16.40 / 2165.04 ms │ 2157.92 / 2216.51 ±32.23 / 2255.70 ms │    no change │
│ QQuery 19 │    244.68 / 257.86 ±24.56 / 306.96 ms │    247.07 / 261.43 ±22.46 / 306.22 ms │    no change │
│ QQuery 20 │    356.46 / 369.94 ±10.73 / 384.78 ms │     358.40 / 366.18 ±8.08 / 380.90 ms │    no change │
│ QQuery 21 │     659.82 / 663.27 ±4.09 / 670.89 ms │     654.59 / 665.04 ±6.24 / 673.33 ms │    no change │
│ QQuery 22 │        61.99 / 64.86 ±2.29 / 68.36 ms │        60.79 / 64.87 ±5.49 / 75.60 ms │    no change │
└───────────┴───────────────────────────────────────┴───────────────────────────────────────┴──────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Benchmark Summary                              ┃           ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ Total Time (HEAD)                              │ 8282.22ms │
│ Total Time (perf_hash-join-no-take-in-probe)   │ 8477.78ms │
│ Average Time (HEAD)                            │  376.46ms │
│ Average Time (perf_hash-join-no-take-in-probe) │  385.35ms │
│ Queries Faster                                 │         0 │
│ Queries Slower                                 │         3 │
│ Queries with No Change                         │        19 │
│ Queries with Failure                           │         0 │
└────────────────────────────────────────────────┴───────────┘

Resource Usage

tpch10 — base (merge-base)

Metric Value
Wall time 45.0s
Peak memory 4.7 GiB
Avg memory 1.6 GiB
CPU user 428.7s
CPU sys 20.7s
Peak spill 0 B

tpch10 — branch

Metric Value
Wall time 45.0s
Peak memory 4.8 GiB
Avg memory 1.7 GiB
CPU user 439.4s
CPU sys 20.4s
Peak spill 0 B

File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Instance: c4a-highmem-16 (12 vCPU / 65 GiB)

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Details

Comparing HEAD and perf_hash-join-no-take-in-probe
--------------------
Benchmark tpcds_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                  HEAD ┃        perf_hash-join-no-take-in-probe ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 1  │           6.36 / 7.04 ±0.99 / 9.02 ms │            5.99 / 6.40 ±0.69 / 7.78 ms │ +1.10x faster │
│ QQuery 2  │      83.14 / 99.15 ±27.75 / 154.59 ms │         81.51 / 82.58 ±0.92 / 84.27 ms │ +1.20x faster │
│ QQuery 3  │        31.10 / 31.57 ±0.44 / 32.26 ms │         31.17 / 31.76 ±0.35 / 32.21 ms │     no change │
│ QQuery 4  │    563.37 / 581.60 ±14.29 / 605.97 ms │     521.01 / 531.14 ±16.57 / 563.81 ms │ +1.10x faster │
│ QQuery 5  │        55.37 / 55.93 ±0.39 / 56.55 ms │         51.99 / 52.30 ±0.29 / 52.81 ms │ +1.07x faster │
│ QQuery 6  │        40.50 / 44.11 ±5.44 / 54.85 ms │         37.14 / 37.51 ±0.24 / 37.76 ms │ +1.18x faster │
│ QQuery 7  │       98.32 / 99.74 ±1.22 / 101.58 ms │        94.24 / 98.06 ±4.54 / 106.10 ms │     no change │
│ QQuery 8  │        38.31 / 38.84 ±0.32 / 39.28 ms │         37.05 / 37.60 ±0.44 / 38.33 ms │     no change │
│ QQuery 9  │        53.00 / 60.36 ±6.19 / 70.13 ms │         54.32 / 55.37 ±1.29 / 57.78 ms │ +1.09x faster │
│ QQuery 10 │        64.17 / 65.44 ±0.74 / 66.35 ms │         62.99 / 63.65 ±0.38 / 63.97 ms │     no change │
│ QQuery 11 │    325.64 / 340.70 ±14.09 / 366.35 ms │      340.11 / 347.99 ±6.63 / 359.71 ms │     no change │
│ QQuery 12 │        30.10 / 32.62 ±1.98 / 34.60 ms │         30.59 / 31.89 ±1.22 / 34.02 ms │     no change │
│ QQuery 13 │     120.91 / 123.92 ±2.13 / 126.24 ms │      121.50 / 126.79 ±6.26 / 138.93 ms │     no change │
│ QQuery 14 │     424.22 / 432.28 ±4.89 / 438.22 ms │      419.16 / 422.97 ±3.30 / 427.62 ms │     no change │
│ QQuery 15 │        61.04 / 63.58 ±1.41 / 64.76 ms │         59.05 / 60.31 ±0.85 / 61.46 ms │ +1.05x faster │
│ QQuery 16 │           7.22 / 7.42 ±0.13 / 7.58 ms │            6.77 / 6.95 ±0.18 / 7.19 ms │ +1.07x faster │
│ QQuery 17 │        81.99 / 83.40 ±1.06 / 84.94 ms │         81.62 / 83.27 ±1.96 / 86.85 ms │     no change │
│ QQuery 18 │     125.61 / 126.51 ±1.02 / 128.15 ms │      124.84 / 126.30 ±0.87 / 127.25 ms │     no change │
│ QQuery 19 │        42.32 / 43.47 ±0.97 / 44.72 ms │         42.18 / 43.18 ±0.61 / 43.92 ms │     no change │
│ QQuery 20 │        36.29 / 37.08 ±0.67 / 37.96 ms │         36.27 / 36.43 ±0.21 / 36.84 ms │     no change │
│ QQuery 21 │        17.72 / 17.81 ±0.09 / 17.98 ms │         18.16 / 18.69 ±0.42 / 19.45 ms │     no change │
│ QQuery 22 │        62.91 / 63.55 ±0.36 / 64.03 ms │         65.39 / 67.12 ±2.24 / 71.49 ms │  1.06x slower │
│ QQuery 23 │     418.60 / 426.46 ±4.27 / 430.98 ms │      409.06 / 419.77 ±9.05 / 432.01 ms │     no change │
│ QQuery 24 │     231.60 / 236.82 ±4.88 / 244.87 ms │      229.78 / 231.81 ±1.69 / 234.85 ms │     no change │
│ QQuery 25 │     112.43 / 118.22 ±3.39 / 122.07 ms │      111.94 / 115.56 ±5.52 / 126.55 ms │     no change │
│ QQuery 26 │        58.85 / 60.22 ±1.14 / 61.91 ms │         58.56 / 59.10 ±0.36 / 59.63 ms │     no change │
│ QQuery 27 │          7.13 / 8.75 ±3.04 / 14.83 ms │            6.39 / 6.51 ±0.14 / 6.79 ms │ +1.34x faster │
│ QQuery 28 │        61.42 / 63.12 ±1.06 / 64.50 ms │         61.93 / 64.40 ±3.00 / 70.20 ms │     no change │
│ QQuery 29 │      99.87 / 101.92 ±3.15 / 108.14 ms │        97.92 / 99.23 ±1.01 / 100.59 ms │     no change │
│ QQuery 30 │        33.61 / 35.51 ±2.84 / 41.14 ms │         32.97 / 33.73 ±0.51 / 34.44 ms │ +1.05x faster │
│ QQuery 31 │     120.04 / 123.49 ±1.85 / 125.33 ms │      112.98 / 117.40 ±4.31 / 124.84 ms │     no change │
│ QQuery 32 │        23.49 / 24.72 ±0.96 / 26.42 ms │         24.16 / 24.52 ±0.31 / 25.03 ms │     no change │
│ QQuery 33 │        40.71 / 41.89 ±0.78 / 42.95 ms │         42.14 / 43.02 ±0.83 / 44.54 ms │     no change │
│ QQuery 34 │        11.64 / 14.52 ±3.55 / 21.43 ms │         11.46 / 11.69 ±0.27 / 12.19 ms │ +1.24x faster │
│ QQuery 35 │        84.24 / 87.64 ±2.27 / 90.61 ms │         77.10 / 85.35 ±4.28 / 88.71 ms │     no change │
│ QQuery 36 │           6.71 / 6.79 ±0.12 / 7.02 ms │            6.98 / 7.16 ±0.14 / 7.37 ms │  1.05x slower │
│ QQuery 37 │          8.36 / 9.02 ±1.10 / 11.20 ms │            7.99 / 8.18 ±0.13 / 8.37 ms │ +1.10x faster │
│ QQuery 38 │        77.86 / 80.81 ±2.85 / 85.27 ms │         73.87 / 74.87 ±0.72 / 75.95 ms │ +1.08x faster │
│ QQuery 39 │     111.03 / 116.94 ±4.12 / 122.49 ms │     102.45 / 113.31 ±10.22 / 130.74 ms │     no change │
│ QQuery 40 │        26.03 / 28.03 ±1.29 / 29.57 ms │         25.78 / 26.32 ±0.51 / 27.28 ms │ +1.07x faster │
│ QQuery 41 │        12.68 / 12.82 ±0.13 / 13.00 ms │         12.82 / 13.31 ±0.31 / 13.73 ms │     no change │
│ QQuery 42 │        26.51 / 27.55 ±0.93 / 29.23 ms │         24.64 / 25.67 ±0.62 / 26.52 ms │ +1.07x faster │
│ QQuery 43 │           6.22 / 6.35 ±0.10 / 6.47 ms │            5.80 / 5.84 ±0.05 / 5.93 ms │ +1.09x faster │
│ QQuery 44 │        12.31 / 12.80 ±0.58 / 13.95 ms │          9.93 / 10.63 ±0.40 / 11.08 ms │ +1.20x faster │
│ QQuery 45 │        56.18 / 61.26 ±5.07 / 70.54 ms │         55.54 / 57.35 ±1.22 / 58.62 ms │ +1.07x faster │
│ QQuery 46 │        14.70 / 15.05 ±0.29 / 15.43 ms │         13.17 / 14.99 ±2.93 / 20.84 ms │     no change │
│ QQuery 47 │    271.95 / 294.27 ±16.72 / 323.36 ms │     286.26 / 310.03 ±15.71 / 330.70 ms │  1.05x slower │
│ QQuery 48 │     102.32 / 107.38 ±7.18 / 121.10 ms │      103.83 / 107.13 ±2.26 / 109.84 ms │     no change │
│ QQuery 49 │        83.95 / 88.69 ±3.15 / 93.87 ms │         81.60 / 83.95 ±1.97 / 87.39 ms │ +1.06x faster │
│ QQuery 50 │        67.50 / 69.55 ±1.39 / 71.58 ms │         61.41 / 62.56 ±0.94 / 64.30 ms │ +1.11x faster │
│ QQuery 51 │     106.53 / 112.17 ±4.67 / 119.63 ms │      100.67 / 103.77 ±1.59 / 105.07 ms │ +1.08x faster │
│ QQuery 52 │        26.81 / 27.49 ±0.48 / 28.03 ms │         25.73 / 26.05 ±0.33 / 26.68 ms │ +1.06x faster │
│ QQuery 53 │        31.58 / 32.15 ±0.41 / 32.85 ms │         30.74 / 30.97 ±0.15 / 31.14 ms │     no change │
│ QQuery 54 │        59.87 / 63.64 ±4.25 / 71.76 ms │         56.29 / 56.64 ±0.21 / 56.96 ms │ +1.12x faster │
│ QQuery 55 │        26.15 / 26.57 ±0.26 / 26.83 ms │         24.04 / 24.99 ±0.65 / 25.85 ms │ +1.06x faster │
│ QQuery 56 │        44.21 / 45.17 ±0.71 / 46.22 ms │         39.74 / 40.35 ±0.55 / 41.29 ms │ +1.12x faster │
│ QQuery 57 │     200.96 / 213.74 ±7.37 / 220.93 ms │      179.54 / 183.26 ±3.62 / 188.11 ms │ +1.17x faster │
│ QQuery 58 │     125.41 / 133.14 ±6.66 / 144.93 ms │      116.47 / 117.73 ±1.18 / 119.72 ms │ +1.13x faster │
│ QQuery 59 │     125.38 / 128.76 ±2.43 / 132.10 ms │      118.82 / 120.14 ±1.94 / 123.94 ms │ +1.07x faster │
│ QQuery 60 │        45.06 / 47.17 ±2.94 / 52.90 ms │         40.78 / 41.28 ±0.54 / 42.28 ms │ +1.14x faster │
│ QQuery 61 │        14.60 / 14.79 ±0.16 / 15.03 ms │         12.66 / 12.88 ±0.15 / 13.06 ms │ +1.15x faster │
│ QQuery 62 │        48.88 / 49.54 ±0.64 / 50.74 ms │         46.77 / 47.07 ±0.35 / 47.57 ms │     no change │
│ QQuery 63 │        32.54 / 33.31 ±0.49 / 33.82 ms │         30.47 / 31.33 ±1.49 / 34.30 ms │ +1.06x faster │
│ QQuery 64 │     436.63 / 446.95 ±8.61 / 459.97 ms │      417.72 / 420.01 ±2.06 / 423.60 ms │ +1.06x faster │
│ QQuery 65 │     158.46 / 162.77 ±4.74 / 169.98 ms │      149.72 / 152.62 ±2.13 / 155.92 ms │ +1.07x faster │
│ QQuery 66 │        85.18 / 86.98 ±2.18 / 91.03 ms │         79.69 / 80.74 ±0.58 / 81.36 ms │ +1.08x faster │
│ QQuery 67 │    299.20 / 327.17 ±15.43 / 343.90 ms │     268.28 / 295.76 ±15.56 / 310.72 ms │ +1.11x faster │
│ QQuery 68 │        14.26 / 14.49 ±0.20 / 14.78 ms │         12.66 / 12.87 ±0.13 / 13.07 ms │ +1.13x faster │
│ QQuery 69 │        61.68 / 65.36 ±3.59 / 71.96 ms │         59.61 / 62.98 ±5.22 / 73.37 ms │     no change │
│ QQuery 70 │     112.42 / 118.53 ±4.14 / 125.09 ms │      109.63 / 114.78 ±3.18 / 119.34 ms │     no change │
│ QQuery 71 │        37.57 / 38.40 ±0.61 / 39.24 ms │         38.91 / 39.72 ±0.59 / 40.52 ms │     no change │
│ QQuery 72 │ 2263.12 / 2377.19 ±97.40 / 2491.44 ms │ 2362.30 / 2555.07 ±115.38 / 2674.66 ms │  1.07x slower │
│ QQuery 73 │         9.76 / 10.25 ±0.40 / 10.78 ms │          9.93 / 10.23 ±0.25 / 10.69 ms │     no change │
│ QQuery 74 │     183.75 / 194.19 ±6.80 / 203.15 ms │      193.64 / 201.71 ±8.44 / 217.40 ms │     no change │
│ QQuery 75 │     152.48 / 158.52 ±5.58 / 167.23 ms │      153.46 / 157.77 ±3.73 / 162.33 ms │     no change │
│ QQuery 76 │        36.32 / 36.90 ±0.34 / 37.30 ms │         36.41 / 36.69 ±0.15 / 36.84 ms │     no change │
│ QQuery 77 │        62.31 / 64.73 ±2.52 / 69.30 ms │         61.79 / 62.87 ±1.09 / 64.58 ms │     no change │
│ QQuery 78 │     190.08 / 193.36 ±1.96 / 195.47 ms │      203.06 / 210.26 ±7.19 / 220.23 ms │  1.09x slower │
│ QQuery 79 │        68.07 / 69.41 ±1.13 / 71.12 ms │         71.39 / 73.23 ±1.18 / 74.66 ms │  1.05x slower │
│ QQuery 80 │     101.68 / 106.91 ±5.67 / 117.16 ms │      107.33 / 110.78 ±2.18 / 113.01 ms │     no change │
│ QQuery 81 │        27.70 / 29.98 ±3.36 / 36.61 ms │         27.68 / 29.95 ±3.87 / 37.68 ms │     no change │
│ QQuery 82 │        18.41 / 18.95 ±0.50 / 19.62 ms │         17.52 / 18.24 ±0.42 / 18.62 ms │     no change │
│ QQuery 83 │        41.29 / 44.47 ±3.36 / 48.60 ms │         41.47 / 42.36 ±0.53 / 42.95 ms │     no change │
│ QQuery 84 │        31.61 / 32.25 ±0.46 / 32.95 ms │         31.34 / 32.06 ±0.49 / 32.61 ms │     no change │
│ QQuery 85 │     109.19 / 112.47 ±1.79 / 114.52 ms │      111.31 / 115.23 ±3.96 / 121.23 ms │     no change │
│ QQuery 86 │        26.86 / 27.22 ±0.43 / 28.04 ms │         26.46 / 28.19 ±0.99 / 29.51 ms │     no change │
│ QQuery 87 │        66.52 / 69.46 ±2.19 / 72.62 ms │         67.73 / 72.25 ±2.73 / 75.48 ms │     no change │
│ QQuery 88 │        65.45 / 67.54 ±1.55 / 69.67 ms │         65.46 / 66.60 ±0.80 / 67.84 ms │     no change │
│ QQuery 89 │        37.36 / 39.47 ±2.30 / 43.53 ms │         40.64 / 43.24 ±4.09 / 51.35 ms │  1.10x slower │
│ QQuery 90 │        18.95 / 19.20 ±0.17 / 19.49 ms │         19.34 / 19.65 ±0.33 / 20.24 ms │     no change │
│ QQuery 91 │        47.56 / 48.25 ±0.47 / 49.01 ms │         48.91 / 49.99 ±0.84 / 51.07 ms │     no change │
│ QQuery 92 │        30.91 / 31.69 ±0.69 / 32.87 ms │         32.06 / 32.67 ±0.53 / 33.63 ms │     no change │
│ QQuery 93 │        51.32 / 51.98 ±0.78 / 53.47 ms │         51.31 / 53.00 ±1.38 / 55.06 ms │     no change │
│ QQuery 94 │        40.71 / 44.63 ±2.08 / 46.39 ms │         41.03 / 42.57 ±2.11 / 46.74 ms │     no change │
│ QQuery 95 │        87.03 / 89.73 ±2.83 / 94.85 ms │         83.64 / 85.61 ±1.22 / 87.34 ms │     no change │
│ QQuery 96 │        25.36 / 25.60 ±0.28 / 26.14 ms │         24.90 / 25.16 ±0.20 / 25.45 ms │     no change │
│ QQuery 97 │        59.09 / 59.93 ±0.65 / 60.83 ms │         58.55 / 59.42 ±1.08 / 61.36 ms │     no change │
│ QQuery 98 │        43.96 / 45.58 ±1.18 / 47.05 ms │         44.72 / 47.37 ±2.73 / 50.74 ms │     no change │
│ QQuery 99 │        73.72 / 75.04 ±1.08 / 76.41 ms │         72.18 / 74.26 ±1.57 / 76.59 ms │     no change │
└───────────┴───────────────────────────────────────┴────────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                              ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                              │ 11069.90ms │
│ Total Time (perf_hash-join-no-take-in-probe)   │ 10973.98ms │
│ Average Time (HEAD)                            │   111.82ms │
│ Average Time (perf_hash-join-no-take-in-probe) │   110.85ms │
│ Queries Faster                                 │         36 │
│ Queries Slower                                 │          7 │
│ Queries with No Change                         │         56 │
│ Queries with Failure                           │          0 │
└────────────────────────────────────────────────┴────────────┘

Resource Usage

tpcds — base (merge-base)

Metric Value
Wall time 60.0s
Peak memory 2.0 GiB
Avg memory 1.4 GiB
CPU user 244.9s
CPU sys 7.1s
Peak spill 0 B

tpcds — branch

Metric Value
Wall time 60.0s
Peak memory 2.2 GiB
Avg memory 1.5 GiB
CPU user 252.7s
CPU sys 6.7s
Peak spill 0 B

File an issue against this benchmark runner

@Dandandan

Copy link
Copy Markdown
Contributor

It looks it is mostly faster but also regresses on some

@Dandandan

Copy link
Copy Markdown
Contributor

run benchmark tpch10 tpcds

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4847668034-760-v7x72 6.12.85+ #1 SMP Mon May 11 08:17:35 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected

Comparing perf/hash-join-no-take-in-probe (d647868) to bde8e5b (merge-base) diff using: tpch10
Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4847668034-761-lqdjx 6.12.85+ #1 SMP Mon May 11 08:17:35 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected

Comparing perf/hash-join-no-take-in-probe (d647868) to bde8e5b (merge-base) diff using: tpcds
Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Instance: c4a-highmem-16 (12 vCPU / 65 GiB)

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Details

Comparing HEAD and perf_hash-join-no-take-in-probe
--------------------
Benchmark tpch_sf10.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┓
┃ Query     ┃                                  HEAD ┃       perf_hash-join-no-take-in-probe ┃       Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━┩
│ QQuery 1  │     315.18 / 316.93 ±1.42 / 319.18 ms │     314.32 / 316.65 ±1.18 / 317.53 ms │    no change │
│ QQuery 2  │     111.26 / 115.58 ±3.08 / 119.48 ms │     113.84 / 118.65 ±4.49 / 125.65 ms │    no change │
│ QQuery 3  │     240.43 / 242.24 ±1.57 / 244.57 ms │     240.87 / 247.37 ±4.40 / 253.89 ms │    no change │
│ QQuery 4  │     115.88 / 117.57 ±1.49 / 119.81 ms │     114.57 / 116.89 ±2.01 / 119.98 ms │    no change │
│ QQuery 5  │     365.79 / 375.28 ±6.67 / 384.71 ms │     377.04 / 379.95 ±1.55 / 381.09 ms │    no change │
│ QQuery 6  │     126.18 / 128.11 ±3.01 / 134.01 ms │     127.00 / 129.68 ±4.55 / 138.74 ms │    no change │
│ QQuery 7  │    472.24 / 487.81 ±10.50 / 500.19 ms │    517.61 / 536.02 ±16.41 / 560.16 ms │ 1.10x slower │
│ QQuery 8  │     386.26 / 396.93 ±7.17 / 405.63 ms │     389.12 / 394.04 ±3.05 / 398.36 ms │    no change │
│ QQuery 9  │     567.84 / 573.67 ±6.02 / 585.01 ms │     597.89 / 605.63 ±4.26 / 610.53 ms │ 1.06x slower │
│ QQuery 10 │     305.24 / 315.63 ±6.93 / 321.66 ms │     317.55 / 320.27 ±2.22 / 322.67 ms │    no change │
│ QQuery 11 │       90.71 / 95.00 ±6.31 / 107.36 ms │       94.77 / 99.58 ±5.13 / 109.38 ms │    no change │
│ QQuery 12 │     180.06 / 188.08 ±6.77 / 198.22 ms │     181.50 / 187.21 ±5.63 / 196.42 ms │    no change │
│ QQuery 13 │     301.74 / 307.65 ±6.68 / 320.69 ms │     325.69 / 331.17 ±6.13 / 340.09 ms │ 1.08x slower │
│ QQuery 14 │     176.43 / 181.15 ±6.23 / 193.48 ms │     177.25 / 180.26 ±3.40 / 185.32 ms │    no change │
│ QQuery 15 │     314.91 / 316.74 ±2.22 / 320.72 ms │     312.49 / 317.90 ±3.00 / 321.46 ms │    no change │
│ QQuery 16 │        84.63 / 85.96 ±1.18 / 87.47 ms │        85.67 / 87.76 ±1.75 / 90.43 ms │    no change │
│ QQuery 17 │     680.61 / 692.11 ±7.93 / 702.68 ms │    677.32 / 693.52 ±10.79 / 706.94 ms │    no change │
│ QQuery 18 │ 2189.34 / 2215.23 ±24.12 / 2250.79 ms │ 2249.56 / 2290.10 ±35.18 / 2350.38 ms │    no change │
│ QQuery 19 │    250.28 / 256.86 ±11.53 / 279.89 ms │    252.01 / 259.01 ±12.56 / 284.10 ms │    no change │
│ QQuery 20 │    368.58 / 390.66 ±14.00 / 408.24 ms │    373.47 / 387.65 ±10.80 / 405.77 ms │    no change │
│ QQuery 21 │     689.76 / 695.38 ±3.29 / 699.27 ms │     684.34 / 694.01 ±4.91 / 697.59 ms │    no change │
│ QQuery 22 │        62.69 / 66.13 ±2.60 / 69.80 ms │        61.99 / 65.43 ±2.43 / 68.01 ms │    no change │
└───────────┴───────────────────────────────────────┴───────────────────────────────────────┴──────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Benchmark Summary                              ┃           ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ Total Time (HEAD)                              │ 8560.70ms │
│ Total Time (perf_hash-join-no-take-in-probe)   │ 8758.75ms │
│ Average Time (HEAD)                            │  389.12ms │
│ Average Time (perf_hash-join-no-take-in-probe) │  398.12ms │
│ Queries Faster                                 │         0 │
│ Queries Slower                                 │         3 │
│ Queries with No Change                         │        19 │
│ Queries with Failure                           │         0 │
└────────────────────────────────────────────────┴───────────┘

Resource Usage

tpch10 — base (merge-base)

Metric Value
Wall time 45.0s
Peak memory 4.8 GiB
Avg memory 1.6 GiB
CPU user 444.5s
CPU sys 20.9s
Peak spill 0 B

tpch10 — branch

Metric Value
Wall time 45.0s
Peak memory 4.7 GiB
Avg memory 1.6 GiB
CPU user 453.7s
CPU sys 20.7s
Peak spill 0 B

File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Instance: c4a-highmem-16 (12 vCPU / 65 GiB)

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Details

Comparing HEAD and perf_hash-join-no-take-in-probe
--------------------
Benchmark tpcds_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Query     ┃                                  HEAD ┃       perf_hash-join-no-take-in-probe ┃    Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ QQuery 1  │           6.07 / 6.51 ±0.77 / 8.05 ms │           5.98 / 6.47 ±0.81 / 8.08 ms │ no change │
│ QQuery 2  │        82.59 / 83.06 ±0.36 / 83.58 ms │        83.12 / 83.59 ±0.30 / 83.94 ms │ no change │
│ QQuery 3  │        31.07 / 31.23 ±0.11 / 31.36 ms │        31.16 / 31.37 ±0.11 / 31.45 ms │ no change │
│ QQuery 4  │     536.83 / 544.80 ±5.64 / 554.35 ms │     545.46 / 547.16 ±2.27 / 551.66 ms │ no change │
│ QQuery 5  │        53.10 / 53.50 ±0.31 / 54.03 ms │        53.36 / 54.01 ±0.41 / 54.60 ms │ no change │
│ QQuery 6  │        38.69 / 38.95 ±0.29 / 39.50 ms │        38.33 / 39.10 ±0.47 / 39.70 ms │ no change │
│ QQuery 7  │      97.51 / 100.17 ±3.47 / 107.04 ms │      97.09 / 101.26 ±5.22 / 111.25 ms │ no change │
│ QQuery 8  │        37.85 / 38.29 ±0.64 / 39.57 ms │        38.25 / 38.50 ±0.30 / 39.04 ms │ no change │
│ QQuery 9  │        54.08 / 56.79 ±1.97 / 59.95 ms │        55.18 / 56.61 ±1.66 / 59.84 ms │ no change │
│ QQuery 10 │        64.78 / 66.86 ±3.25 / 73.28 ms │        64.45 / 66.41 ±2.65 / 71.65 ms │ no change │
│ QQuery 11 │     339.84 / 344.79 ±3.62 / 350.38 ms │     344.48 / 347.67 ±2.64 / 350.86 ms │ no change │
│ QQuery 12 │        30.47 / 30.78 ±0.17 / 30.95 ms │        30.40 / 30.64 ±0.27 / 31.13 ms │ no change │
│ QQuery 13 │     121.75 / 124.59 ±2.58 / 129.41 ms │     123.34 / 126.31 ±3.85 / 133.69 ms │ no change │
│ QQuery 14 │     426.73 / 431.27 ±3.59 / 435.62 ms │     426.51 / 430.73 ±3.20 / 435.10 ms │ no change │
│ QQuery 15 │        63.34 / 64.24 ±0.55 / 64.88 ms │        64.83 / 67.25 ±3.16 / 73.40 ms │ no change │
│ QQuery 16 │           7.40 / 7.49 ±0.06 / 7.55 ms │           7.37 / 7.48 ±0.10 / 7.64 ms │ no change │
│ QQuery 17 │        83.25 / 85.60 ±2.21 / 89.70 ms │        82.64 / 84.81 ±1.87 / 88.24 ms │ no change │
│ QQuery 18 │     128.99 / 130.04 ±0.71 / 131.04 ms │     129.45 / 131.31 ±1.59 / 134.05 ms │ no change │
│ QQuery 19 │        42.88 / 44.39 ±1.99 / 48.31 ms │        42.96 / 43.29 ±0.38 / 43.88 ms │ no change │
│ QQuery 20 │        36.91 / 37.73 ±0.47 / 38.28 ms │        37.90 / 38.40 ±0.33 / 38.81 ms │ no change │
│ QQuery 21 │        18.61 / 18.70 ±0.09 / 18.85 ms │        18.58 / 18.68 ±0.06 / 18.77 ms │ no change │
│ QQuery 22 │        65.76 / 66.85 ±0.86 / 68.39 ms │        67.66 / 68.20 ±0.47 / 68.76 ms │ no change │
│ QQuery 23 │     436.02 / 442.50 ±4.35 / 449.66 ms │     440.24 / 444.95 ±4.46 / 452.13 ms │ no change │
│ QQuery 24 │     234.98 / 238.00 ±4.18 / 246.17 ms │     234.86 / 237.09 ±1.79 / 240.36 ms │ no change │
│ QQuery 25 │     115.72 / 116.25 ±0.79 / 117.78 ms │     114.87 / 116.34 ±0.74 / 116.88 ms │ no change │
│ QQuery 26 │        59.92 / 62.44 ±3.48 / 69.25 ms │        60.63 / 62.44 ±2.42 / 67.24 ms │ no change │
│ QQuery 27 │           6.94 / 6.99 ±0.04 / 7.04 ms │           6.99 / 7.16 ±0.14 / 7.40 ms │ no change │
│ QQuery 28 │        57.58 / 61.03 ±2.59 / 63.70 ms │        59.53 / 62.03 ±2.06 / 64.37 ms │ no change │
│ QQuery 29 │     100.81 / 101.73 ±0.78 / 102.84 ms │     100.78 / 101.71 ±0.64 / 102.37 ms │ no change │
│ QQuery 30 │        34.62 / 36.32 ±1.99 / 40.19 ms │        34.85 / 36.37 ±2.28 / 40.91 ms │ no change │
│ QQuery 31 │     116.38 / 117.01 ±0.64 / 118.19 ms │     116.92 / 117.66 ±0.85 / 119.30 ms │ no change │
│ QQuery 32 │        21.96 / 22.21 ±0.21 / 22.53 ms │        22.05 / 22.68 ±0.98 / 24.61 ms │ no change │
│ QQuery 33 │        39.51 / 40.29 ±1.02 / 42.29 ms │        39.59 / 40.46 ±0.97 / 42.34 ms │ no change │
│ QQuery 34 │        10.52 / 10.97 ±0.50 / 11.86 ms │        10.72 / 10.85 ±0.23 / 11.30 ms │ no change │
│ QQuery 35 │        76.94 / 77.89 ±0.68 / 78.81 ms │        78.72 / 79.14 ±0.32 / 79.69 ms │ no change │
│ QQuery 36 │           6.39 / 6.44 ±0.08 / 6.59 ms │           6.56 / 6.66 ±0.10 / 6.82 ms │ no change │
│ QQuery 37 │           7.56 / 7.70 ±0.13 / 7.91 ms │           7.67 / 7.72 ±0.05 / 7.81 ms │ no change │
│ QQuery 38 │        67.64 / 67.91 ±0.26 / 68.38 ms │        67.36 / 68.26 ±0.45 / 68.59 ms │ no change │
│ QQuery 39 │        92.99 / 94.42 ±0.84 / 95.16 ms │       94.16 / 96.27 ±3.15 / 102.54 ms │ no change │
│ QQuery 40 │        25.00 / 25.44 ±0.38 / 26.08 ms │        25.01 / 25.39 ±0.35 / 26.01 ms │ no change │
│ QQuery 41 │        12.23 / 12.40 ±0.17 / 12.69 ms │        12.48 / 12.60 ±0.10 / 12.74 ms │ no change │
│ QQuery 42 │        25.17 / 25.49 ±0.37 / 26.14 ms │        25.13 / 25.82 ±0.65 / 26.99 ms │ no change │
│ QQuery 43 │           5.26 / 5.34 ±0.09 / 5.51 ms │           5.37 / 5.48 ±0.07 / 5.57 ms │ no change │
│ QQuery 44 │        10.01 / 10.11 ±0.13 / 10.37 ms │        10.30 / 10.33 ±0.03 / 10.37 ms │ no change │
│ QQuery 45 │        44.95 / 45.72 ±0.54 / 46.39 ms │        44.87 / 46.90 ±2.12 / 50.45 ms │ no change │
│ QQuery 46 │        12.49 / 14.12 ±2.06 / 18.17 ms │        12.69 / 13.53 ±0.51 / 14.22 ms │ no change │
│ QQuery 47 │     264.21 / 267.26 ±3.78 / 273.93 ms │     267.81 / 268.43 ±0.69 / 269.48 ms │ no change │
│ QQuery 48 │      99.70 / 100.07 ±0.48 / 100.99 ms │     100.38 / 100.67 ±0.31 / 101.14 ms │ no change │
│ QQuery 49 │        79.09 / 79.95 ±0.55 / 80.51 ms │        79.77 / 81.92 ±3.36 / 88.62 ms │ no change │
│ QQuery 50 │        60.51 / 61.33 ±0.52 / 62.00 ms │        60.63 / 61.32 ±0.41 / 61.85 ms │ no change │
│ QQuery 51 │     102.10 / 105.17 ±3.33 / 111.63 ms │     103.57 / 105.60 ±1.42 / 107.15 ms │ no change │
│ QQuery 52 │        25.11 / 25.42 ±0.27 / 25.90 ms │        25.39 / 25.58 ±0.12 / 25.74 ms │ no change │
│ QQuery 53 │        30.92 / 31.21 ±0.23 / 31.45 ms │        30.92 / 31.29 ±0.23 / 31.59 ms │ no change │
│ QQuery 54 │        57.66 / 57.86 ±0.18 / 58.09 ms │        57.38 / 57.67 ±0.27 / 58.16 ms │ no change │
│ QQuery 55 │        24.44 / 24.62 ±0.15 / 24.85 ms │        24.66 / 24.92 ±0.20 / 25.17 ms │ no change │
│ QQuery 56 │        40.74 / 41.25 ±0.33 / 41.63 ms │        41.27 / 42.96 ±2.06 / 47.02 ms │ no change │
│ QQuery 57 │     185.10 / 188.93 ±4.49 / 197.70 ms │     189.38 / 189.76 ±0.20 / 189.95 ms │ no change │
│ QQuery 58 │     120.60 / 122.86 ±1.96 / 126.22 ms │     121.03 / 122.87 ±2.30 / 127.25 ms │ no change │
│ QQuery 59 │     120.70 / 121.56 ±0.52 / 122.30 ms │     120.98 / 122.73 ±1.87 / 126.29 ms │ no change │
│ QQuery 60 │        41.68 / 42.34 ±0.48 / 42.95 ms │        41.52 / 42.43 ±0.64 / 43.24 ms │ no change │
│ QQuery 61 │        13.25 / 13.42 ±0.14 / 13.63 ms │        13.32 / 13.49 ±0.14 / 13.70 ms │ no change │
│ QQuery 62 │        47.62 / 48.71 ±0.90 / 50.37 ms │        48.35 / 49.25 ±0.72 / 50.45 ms │ no change │
│ QQuery 63 │        30.88 / 31.75 ±0.75 / 33.05 ms │        30.96 / 31.66 ±1.03 / 33.71 ms │ no change │
│ QQuery 64 │     426.85 / 429.88 ±3.82 / 436.83 ms │     430.55 / 434.82 ±3.79 / 441.85 ms │ no change │
│ QQuery 65 │     150.53 / 154.22 ±5.05 / 164.19 ms │     150.06 / 153.02 ±2.37 / 155.66 ms │ no change │
│ QQuery 66 │        82.64 / 85.25 ±4.02 / 93.27 ms │        83.58 / 86.54 ±4.01 / 94.01 ms │ no change │
│ QQuery 67 │     267.94 / 271.80 ±3.57 / 277.84 ms │     265.98 / 270.89 ±3.48 / 275.77 ms │ no change │
│ QQuery 68 │        12.64 / 12.77 ±0.11 / 12.93 ms │        12.55 / 12.74 ±0.15 / 12.94 ms │ no change │
│ QQuery 69 │        59.01 / 59.35 ±0.24 / 59.64 ms │        59.05 / 59.99 ±1.01 / 61.59 ms │ no change │
│ QQuery 70 │    108.43 / 115.32 ±10.23 / 135.68 ms │     110.89 / 112.87 ±1.73 / 115.77 ms │ no change │
│ QQuery 71 │        36.68 / 37.08 ±0.27 / 37.40 ms │        37.05 / 37.30 ±0.21 / 37.68 ms │ no change │
│ QQuery 72 │ 2250.69 / 2340.64 ±68.85 / 2451.69 ms │ 2246.01 / 2320.19 ±48.62 / 2376.25 ms │ no change │
│ QQuery 73 │        10.42 / 10.65 ±0.16 / 10.89 ms │        10.49 / 10.65 ±0.14 / 10.88 ms │ no change │
│ QQuery 74 │     192.77 / 195.99 ±2.19 / 198.87 ms │     196.83 / 202.83 ±7.88 / 218.11 ms │ no change │
│ QQuery 75 │     156.03 / 156.71 ±0.54 / 157.43 ms │     156.27 / 158.34 ±1.25 / 160.12 ms │ no change │
│ QQuery 76 │        37.29 / 37.77 ±0.29 / 38.19 ms │        36.90 / 37.54 ±0.47 / 38.08 ms │ no change │
│ QQuery 77 │        63.07 / 63.72 ±0.53 / 64.59 ms │        63.48 / 64.14 ±0.35 / 64.48 ms │ no change │
│ QQuery 78 │     195.09 / 197.94 ±2.24 / 200.95 ms │     196.93 / 199.10 ±1.54 / 201.23 ms │ no change │
│ QQuery 79 │        70.27 / 71.64 ±1.50 / 74.42 ms │        70.25 / 71.43 ±1.54 / 74.43 ms │ no change │
│ QQuery 80 │     103.97 / 104.72 ±0.50 / 105.27 ms │     104.03 / 106.71 ±4.85 / 116.40 ms │ no change │
│ QQuery 81 │        26.98 / 27.21 ±0.18 / 27.51 ms │        27.33 / 27.48 ±0.22 / 27.93 ms │ no change │
│ QQuery 82 │        17.68 / 17.79 ±0.09 / 17.93 ms │        17.62 / 17.78 ±0.13 / 17.95 ms │ no change │
│ QQuery 83 │        42.65 / 43.94 ±1.54 / 46.80 ms │        43.00 / 44.24 ±2.14 / 48.51 ms │ no change │
│ QQuery 84 │        31.68 / 34.72 ±5.00 / 44.69 ms │        31.60 / 33.14 ±2.40 / 37.91 ms │ no change │
│ QQuery 85 │     110.22 / 111.81 ±0.98 / 112.95 ms │     111.49 / 112.19 ±0.40 / 112.66 ms │ no change │
│ QQuery 86 │        26.43 / 27.66 ±1.14 / 29.55 ms │        26.32 / 27.11 ±0.93 / 28.91 ms │ no change │
│ QQuery 87 │        68.02 / 70.69 ±2.47 / 75.38 ms │        68.57 / 70.80 ±3.03 / 76.66 ms │ no change │
│ QQuery 88 │        65.59 / 66.14 ±0.40 / 66.61 ms │        65.37 / 65.85 ±0.51 / 66.81 ms │ no change │
│ QQuery 89 │        37.29 / 37.62 ±0.24 / 37.92 ms │        37.45 / 37.80 ±0.22 / 38.08 ms │ no change │
│ QQuery 90 │        18.27 / 18.43 ±0.14 / 18.67 ms │        18.34 / 18.54 ±0.14 / 18.77 ms │ no change │
│ QQuery 91 │        47.91 / 48.72 ±1.29 / 51.29 ms │        47.91 / 50.05 ±2.28 / 53.79 ms │ no change │
│ QQuery 92 │        31.80 / 33.56 ±2.90 / 39.36 ms │        31.27 / 32.40 ±0.80 / 33.50 ms │ no change │
│ QQuery 93 │        51.87 / 53.35 ±1.08 / 54.82 ms │        52.24 / 53.00 ±0.54 / 53.62 ms │ no change │
│ QQuery 94 │        40.29 / 40.57 ±0.27 / 40.94 ms │        39.73 / 40.27 ±0.41 / 40.97 ms │ no change │
│ QQuery 95 │        85.45 / 87.36 ±2.31 / 91.85 ms │        84.02 / 86.35 ±2.17 / 90.36 ms │ no change │
│ QQuery 96 │        25.40 / 25.48 ±0.07 / 25.58 ms │        25.37 / 25.49 ±0.08 / 25.61 ms │ no change │
│ QQuery 97 │        58.03 / 58.77 ±0.84 / 60.19 ms │        58.24 / 58.96 ±0.82 / 60.22 ms │ no change │
│ QQuery 98 │        45.25 / 45.70 ±0.52 / 46.47 ms │        44.26 / 44.99 ±0.64 / 45.75 ms │ no change │
│ QQuery 99 │        72.41 / 75.01 ±3.54 / 81.89 ms │        73.27 / 75.87 ±3.62 / 82.78 ms │ no change │
└───────────┴───────────────────────────────────────┴───────────────────────────────────────┴───────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                              ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                              │ 10689.07ms │
│ Total Time (perf_hash-join-no-take-in-probe)   │ 10711.10ms │
│ Average Time (HEAD)                            │   107.97ms │
│ Average Time (perf_hash-join-no-take-in-probe) │   108.19ms │
│ Queries Faster                                 │          0 │
│ Queries Slower                                 │          0 │
│ Queries with No Change                         │         99 │
│ Queries with Failure                           │          0 │
└────────────────────────────────────────────────┴────────────┘

Resource Usage

tpcds — base (merge-base)

Metric Value
Wall time 55.0s
Peak memory 2.0 GiB
Avg memory 1.4 GiB
CPU user 244.0s
CPU sys 6.4s
Peak spill 0 B

tpcds — branch

Metric Value
Wall time 55.0s
Peak memory 2.1 GiB
Avg memory 1.4 GiB
CPU user 245.9s
CPU sys 6.4s
Peak spill 0 B

File an issue against this benchmark runner

joroKr21 pushed a commit to coralogix/arrow-datafusion that referenced this pull request Jul 1, 2026
## Which issue does this PR close?

Adds benchmark query for
apache#23237
Useful to test changes in
apache#23209

## Rationale for this change

Q16–Q22 existed in `hj.rs` but were missing `.benchmark` files, so they
were invisible to `bench.sh` and the CI benchmark bot. Q23 is a new
query reproducing a skewed high-fanout pattern where a single partition
does nearly all the join work -- almost all probe rows carry the same
key. Statistics are disabled to force `Partitioned` mode.

## What changes are included in this PR?

- `benchmarks/src/hj.rs`: adds Q23
- `benchmarks/sql_benchmarks/hj/benchmarks/q16–q23.benchmark`: sql
harness files for Q16–Q23 so they run via `bench.sh` and the CI
benchmark bot

## Are these changes tested?

These are benchmark additions, so no tests are needed.


## Are there any user-facing changes?

No
LiaCastaneda and others added 4 commits July 1, 2026 10:16
Replace `equal_rows_arr` (Arrow take + eq_dyn_null + FilterBuilder,
O(matched_pairs) allocations) with an in-place `JoinKeyComparator` loop.
On collision-free build sides — detected once at build time by scanning
the `next` chain for adjacent pairs with distinct keys — skip the per-pair
recheck entirely: probe rows form consecutive runs in the output buffer,
so we check the chain head once and accept/reject the whole run.

This cuts key comparisons from F (fanout) per probe row down to 1 on
uniform-key build sides, producing a 2.4× speedup on high-fanout
string-key joins (Q23, SF100: 1.01s → 0.42s join_time).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@LiaCastaneda
LiaCastaneda force-pushed the perf/hash-join-no-take-in-probe branch from d647868 to f3e1b56 Compare July 1, 2026 08:16
@LiaCastaneda

LiaCastaneda commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

It looks it is mostly faster but also regresses on some

Yes there are a few regressions are there -- There are 36 tpcds queries that run faster (between 5% and 35% faster) and 7 slower ( between 5% - 10% slower). Edit: actually on the second run results look flat 🤔 maybe the regressions/improvements were noise?

I'm trying to run tpcds SF1 again locally but the results seem very flaky :/ I'm thinking we could try adding a fast-path comparison for cases that compare primitive types and join on a single column, as you suggested -- that may be why some queries regress (if those are regressions and not noise)

I rebased the branch before doing the above. Can we run the hj benchmarks? those contain Q23 which should reproduce the issue

@LiaCastaneda

Copy link
Copy Markdown
Contributor Author

For TPCH SF10 results does not look like noise though:

  • 1st run shows regressions in Q7 and Q13
  • 2nd run shows regressions in Q7 and Q13 as well.

@LiaCastaneda

Copy link
Copy Markdown
Contributor Author

Some results of hj Q23 (the query with a lot of skew) on this branch against main, improvements scale with data size:

[SF1] hj/Q23                  time:   [6.6303 ms 6.6572 ms 6.6883 ms]
                        change: [−22.864% −21.577% −20.322%] (p = 0.00 < 0.05)
                        Performance has improved.
[SF10] hj/Q23                  time:   [57.783 ms 58.315 ms 58.839 ms]
                        change: [−50.629% −50.045% −49.435%] (p = 0.00 < 0.05)
                        Performance has improved.
[SF100] hj/Q23                  time:   [438.17 ms 446.21 ms 454.90 ms]
                        change: [−57.693% −56.763% −55.779%] (p = 0.00 < 0.05)
                        Performance has improved.

I ran the whole hj benchmark (twice to filter out noise) on SF10 as well

First run

group     feature-all                            main-all
-----     -----------                            --------
hj/Q01    1.04  1649.3±52.34µs        ? ?/sec    1.00  1588.2±12.72µs        ? ?/sec
hj/Q02    1.03  1662.0±44.06µs        ? ?/sec    1.00  1619.1±18.65µs        ? ?/sec
hj/Q03    1.08     73.3±5.76ms        ? ?/sec    1.00     68.1±0.95ms        ? ?/sec
hj/Q04    1.00     80.9±1.67ms        ? ?/sec    1.05     84.8±5.25ms        ? ?/sec
hj/Q05    1.44   109.9±41.55ms        ? ?/sec    1.00     76.5±5.28ms        ? ?/sec
hj/Q06    1.00   163.0±15.92ms        ? ?/sec    1.00    162.4±6.27ms        ? ?/sec
hj/Q07    1.00     70.9±6.95ms        ? ?/sec    1.06     75.1±8.16ms        ? ?/sec
hj/Q08    1.00    141.1±5.59ms        ? ?/sec    1.05    147.5±3.66ms        ? ?/sec
hj/Q09    1.00     67.6±1.02ms        ? ?/sec    1.08     73.2±1.78ms        ? ?/sec
hj/Q10    1.00    140.7±1.90ms        ? ?/sec    1.14   160.8±11.25ms        ? ?/sec
hj/Q11    1.38    141.5±8.45ms        ? ?/sec    1.00    102.3±4.62ms        ? ?/sec
hj/Q12    1.01    191.3±8.81ms        ? ?/sec    1.00   190.3±12.40ms        ? ?/sec
hj/Q13    1.34    137.1±5.39ms        ? ?/sec    1.00    102.5±2.55ms        ? ?/sec
hj/Q14    1.00    185.1±4.58ms        ? ?/sec    1.05    194.7±6.85ms        ? ?/sec
hj/Q15    1.00    104.0±2.17ms        ? ?/sec    1.09    113.2±6.24ms        ? ?/sec
hj/Q16    1.00  1979.4±58.20µs        ? ?/sec    1.02      2.0±0.10ms        ? ?/sec
hj/Q17    1.00     73.3±2.49ms        ? ?/sec    1.04     76.3±3.40ms        ? ?/sec
hj/Q18    1.00     84.8±1.06ms        ? ?/sec    1.04     88.4±1.20ms        ? ?/sec
hj/Q19    1.00  1430.8±14.37µs        ? ?/sec    1.00   1434.4±9.05µs        ? ?/sec
hj/Q20    1.00     65.2±1.30ms        ? ?/sec    1.07     69.4±1.85ms        ? ?/sec
hj/Q21    1.00     94.5±1.45ms        ? ?/sec    1.06    100.4±2.08ms        ? ?/sec
hj/Q22    1.00     93.4±5.09ms        ? ?/sec    1.02     95.0±1.50ms        ? ?/sec
hj/Q23    1.00     60.0±2.84ms        ? ?/sec    1.93    115.9±0.59ms        ? ?/sec

Second run

group     feature-all                            main-all
-----     -----------                            --------
hj/Q01    1.01  1605.0±85.49µs        ? ?/sec    1.00  1588.2±12.72µs        ? ?/sec
hj/Q02    1.01  1628.8±35.57µs        ? ?/sec    1.00  1619.1±18.65µs        ? ?/sec
hj/Q03    1.00     61.8±4.18ms        ? ?/sec    1.10     68.1±0.95ms        ? ?/sec
hj/Q04    1.00     72.3±2.96ms        ? ?/sec    1.17     84.8±5.25ms        ? ?/sec
hj/Q05    1.00     60.9±0.49ms        ? ?/sec    1.26     76.5±5.28ms        ? ?/sec
hj/Q06    1.00    141.4±5.22ms        ? ?/sec    1.15    162.4±6.27ms        ? ?/sec
hj/Q07    1.00     58.2±1.26ms        ? ?/sec    1.29     75.1±8.16ms        ? ?/sec
hj/Q08    1.00    126.0±5.74ms        ? ?/sec    1.17    147.5±3.66ms        ? ?/sec
hj/Q09    1.00     59.9±2.28ms        ? ?/sec    1.22     73.2±1.78ms        ? ?/sec
hj/Q10    1.00    126.8±1.75ms        ? ?/sec    1.27   160.8±11.25ms        ? ?/sec
hj/Q11    1.17    120.2±1.52ms        ? ?/sec    1.00    102.3±4.62ms        ? ?/sec
hj/Q12    1.00    180.5±9.60ms        ? ?/sec    1.05   190.3±12.40ms        ? ?/sec
hj/Q13    1.21    124.0±5.37ms        ? ?/sec    1.00    102.5±2.55ms        ? ?/sec
hj/Q14    1.00    181.8±7.62ms        ? ?/sec    1.07    194.7±6.85ms        ? ?/sec
hj/Q15    1.00    102.7±6.65ms        ? ?/sec    1.10    113.2±6.24ms        ? ?/sec
hj/Q16    1.00  1943.1±25.10µs        ? ?/sec    1.04      2.0±0.10ms        ? ?/sec
hj/Q17    1.00     71.5±4.16ms        ? ?/sec    1.07     76.3±3.40ms        ? ?/sec
hj/Q18    1.00     81.7±4.43ms        ? ?/sec    1.08     88.4±1.20ms        ? ?/sec
hj/Q19    1.01  1453.6±24.20µs        ? ?/sec    1.00   1434.4±9.05µs        ? ?/sec
hj/Q20    1.00     59.9±3.39ms        ? ?/sec    1.16     69.4±1.85ms        ? ?/sec
hj/Q21    1.00     90.4±4.08ms        ? ?/sec    1.11    100.4±2.08ms        ? ?/sec
hj/Q22    1.00     88.5±2.83ms        ? ?/sec    1.07     95.0±1.50ms        ? ?/sec
hj/Q23    1.00     57.2±0.21ms        ? ?/sec    2.03    115.9±0.59ms        ? ?/sec

Most queries show improvements but I should probably look into Q11 and Q13, will try to profile those

@Dandandan

Copy link
Copy Markdown
Contributor

run benchmark hj

@Dandandan

Copy link
Copy Markdown
Contributor

run benchmark tpch10

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4864772510-798-52mnp 6.12.85+ #1 SMP Mon May 11 08:17:35 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected

Comparing perf/hash-join-no-take-in-probe (f3e1b56) to 9e8dd76 (merge-base) diff using: hj
Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4864774492-799-lfmlz 6.12.85+ #1 SMP Mon May 11 08:17:35 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected

Comparing perf/hash-join-no-take-in-probe (f3e1b56) to 9e8dd76 (merge-base) diff using: tpch10
Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Instance: c4a-highmem-16 (12 vCPU / 65 GiB)

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Details

Comparing HEAD and perf_hash-join-no-take-in-probe
--------------------
Benchmark tpch_sf10.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┓
┃ Query     ┃                               HEAD ┃    perf_hash-join-no-take-in-probe ┃       Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━┩
│ QQuery 1  │  307.20 / 308.49 ±1.40 / 310.43 ms │  307.65 / 308.46 ±0.61 / 309.44 ms │    no change │
│ QQuery 2  │  103.80 / 106.57 ±1.99 / 108.45 ms │  106.13 / 107.45 ±1.30 / 109.93 ms │    no change │
│ QQuery 3  │  232.38 / 236.06 ±4.68 / 244.70 ms │  231.69 / 235.45 ±2.73 / 239.81 ms │    no change │
│ QQuery 4  │  111.23 / 113.96 ±2.00 / 116.40 ms │  111.94 / 115.00 ±2.33 / 117.88 ms │    no change │
│ QQuery 5  │  348.99 / 358.58 ±7.87 / 371.18 ms │  358.61 / 366.56 ±4.74 / 373.02 ms │    no change │
│ QQuery 6  │  122.32 / 123.92 ±1.44 / 126.14 ms │  123.85 / 126.18 ±3.45 / 133.04 ms │    no change │
│ QQuery 7  │  443.30 / 455.13 ±7.15 / 462.21 ms │  497.45 / 506.35 ±9.12 / 521.94 ms │ 1.11x slower │
│ QQuery 8  │  374.11 / 387.75 ±8.32 / 396.65 ms │  379.48 / 388.77 ±7.66 / 400.99 ms │    no change │
│ QQuery 9  │ 544.66 / 557.67 ±13.03 / 579.41 ms │  568.17 / 579.38 ±8.65 / 592.21 ms │    no change │
│ QQuery 10 │  295.31 / 302.79 ±8.04 / 316.87 ms │ 301.43 / 320.04 ±14.66 / 340.43 ms │ 1.06x slower │
│ QQuery 11 │    85.38 / 90.42 ±6.80 / 103.82 ms │    90.67 / 95.56 ±4.80 / 103.05 ms │ 1.06x slower │
│ QQuery 12 │  175.05 / 184.01 ±8.03 / 198.06 ms │  178.86 / 185.32 ±8.65 / 202.37 ms │    no change │
│ QQuery 13 │  285.88 / 295.07 ±6.90 / 301.54 ms │ 304.16 / 320.80 ±13.80 / 336.35 ms │ 1.09x slower │
│ QQuery 14 │  170.96 / 175.77 ±3.86 / 180.36 ms │  172.97 / 177.68 ±4.14 / 185.02 ms │    no change │
│ QQuery 15 │  300.98 / 303.90 ±2.55 / 307.85 ms │  300.43 / 305.58 ±3.44 / 309.83 ms │    no change │
│ QQuery 16 │     63.69 / 68.15 ±4.79 / 77.27 ms │     63.44 / 65.27 ±2.20 / 69.58 ms │    no change │
│ QQuery 17 │  615.34 / 630.72 ±8.98 / 640.91 ms │ 615.93 / 629.71 ±11.17 / 644.48 ms │    no change │
│ QQuery 18 │ 680.81 / 703.86 ±25.91 / 753.50 ms │ 709.44 / 738.64 ±26.03 / 777.96 ms │    no change │
│ QQuery 19 │  246.97 / 259.23 ±9.18 / 268.63 ms │ 242.94 / 257.99 ±17.65 / 282.07 ms │    no change │
│ QQuery 20 │ 272.34 / 283.48 ±13.29 / 309.50 ms │  275.98 / 286.06 ±5.14 / 290.29 ms │    no change │
│ QQuery 21 │  657.01 / 660.23 ±2.30 / 662.86 ms │  646.16 / 656.77 ±8.14 / 666.49 ms │    no change │
│ QQuery 22 │     62.42 / 64.80 ±2.97 / 70.54 ms │     59.77 / 64.46 ±4.78 / 73.59 ms │    no change │
└───────────┴────────────────────────────────────┴────────────────────────────────────┴──────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Benchmark Summary                              ┃           ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ Total Time (HEAD)                              │ 6670.56ms │
│ Total Time (perf_hash-join-no-take-in-probe)   │ 6837.48ms │
│ Average Time (HEAD)                            │  303.21ms │
│ Average Time (perf_hash-join-no-take-in-probe) │  310.79ms │
│ Queries Faster                                 │         0 │
│ Queries Slower                                 │         4 │
│ Queries with No Change                         │        18 │
│ Queries with Failure                           │         0 │
└────────────────────────────────────────────────┴───────────┘

Resource Usage

tpch10 — base (merge-base)

Metric Value
Wall time 35.0s
Peak memory 5.0 GiB
Avg memory 1.5 GiB
CPU user 337.7s
CPU sys 18.9s
Peak spill 0 B

tpch10 — branch

Metric Value
Wall time 35.0s
Peak memory 5.0 GiB
Avg memory 1.6 GiB
CPU user 344.2s
CPU sys 19.0s
Peak spill 0 B

File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

Instance: c4a-highmem-16 (12 vCPU / 65 GiB)

CPU Details (lscpu)
Architecture:                            aarch64
CPU op-mode(s):                          64-bit
Byte Order:                              Little Endian
CPU(s):                                  16
On-line CPU(s) list:                     0-15
Vendor ID:                               ARM
Model name:                              Neoverse-V2
Model:                                   1
Thread(s) per core:                      1
Core(s) per cluster:                     16
Socket(s):                               -
Cluster(s):                              1
Stepping:                                r0p1
BogoMIPS:                                2000.00
Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
L1d cache:                               1 MiB (16 instances)
L1i cache:                               1 MiB (16 instances)
L2 cache:                                32 MiB (16 instances)
L3 cache:                                80 MiB (1 instance)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-15
Vulnerability Gather data sampling:      Not affected
Vulnerability Indirect target selection: Not affected
Vulnerability Itlb multihit:             Not affected
Vulnerability L1tf:                      Not affected
Vulnerability Mds:                       Not affected
Vulnerability Meltdown:                  Not affected
Vulnerability Mmio stale data:           Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Not affected
Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
Vulnerability Spectre v2:                Mitigation; CSV2, BHB
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Not affected
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Not affected
Details

Comparing HEAD and perf_hash-join-no-take-in-probe
--------------------
Benchmark hj.json
--------------------
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query                                                               ┃                               HEAD ┃    perf_hash-join-no-take-in-probe ┃        Change ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 1_density=1_prob_hit=1_25*1.5M                               │        2.02 / 2.41 ±0.50 / 3.40 ms │        2.06 / 2.44 ±0.48 / 3.32 ms │     no change │
│ QQuery 2_density=0.026_prob_hit=1_25*1.5M                           │        4.36 / 4.54 ±0.10 / 4.66 ms │        4.46 / 4.59 ±0.11 / 4.72 ms │     no change │
│ QQuery 3_density=1_prob_hit=1_100K*60M                              │     88.78 / 89.64 ±0.47 / 90.15 ms │     92.60 / 94.22 ±0.95 / 95.31 ms │  1.05x slower │
│ QQuery 4_density=1_prob_hit=0.1_100K*60M                            │  199.03 / 199.80 ±0.90 / 201.47 ms │ 200.32 / 214.98 ±20.49 / 254.43 ms │  1.08x slower │
│ QQuery 5_density=0.75_prob_hit=1_100K*60M                           │ 733.31 / 752.25 ±12.43 / 767.88 ms │ 746.94 / 775.28 ±22.15 / 806.23 ms │     no change │
│ QQuery 6_density=0.75_prob_hit=0.1_100K*60M                         │ 283.62 / 300.20 ±19.34 / 336.12 ms │ 283.38 / 318.41 ±31.41 / 361.49 ms │  1.06x slower │
│ QQuery 7_density=0.5_prob_hit=1_100K*60M                            │ 741.89 / 758.65 ±10.77 / 771.30 ms │ 755.27 / 767.01 ±12.12 / 789.44 ms │     no change │
│ QQuery 8_density=0.5_prob_hit=0.1_100K*60M                          │ 259.09 / 301.15 ±23.23 / 323.76 ms │ 266.50 / 291.09 ±25.59 / 328.13 ms │     no change │
│ QQuery 9_density=0.2_prob_hit=1_100K*60M                            │ 762.15 / 799.99 ±38.54 / 868.91 ms │ 763.91 / 790.68 ±25.90 / 837.24 ms │     no change │
│ QQuery 10_density=0.2_prob_hit=0.1_100K*60M                         │ 262.88 / 274.78 ±13.92 / 301.19 ms │ 264.90 / 279.82 ±15.96 / 310.06 ms │     no change │
│ QQuery 11_density=0.1_prob_hit=1_100K*60M                           │ 764.56 / 781.92 ±15.45 / 805.74 ms │ 768.84 / 789.13 ±19.90 / 824.01 ms │     no change │
│ QQuery 12_density=0.1_prob_hit=0.1_100K*60M                         │ 264.82 / 289.29 ±27.65 / 329.71 ms │ 262.54 / 282.02 ±19.25 / 318.74 ms │     no change │
│ QQuery 13_density=0.01_prob_hit=1_100K*60M                          │ 762.58 / 792.34 ±16.89 / 807.24 ms │ 774.74 / 803.59 ±30.60 / 862.86 ms │     no change │
│ QQuery 14_density=0.01_prob_hit=0.1_100K*60M                        │ 296.12 / 315.65 ±21.07 / 349.85 ms │ 296.73 / 312.63 ±17.15 / 342.34 ms │     no change │
│ QQuery 15_density=0.2_prob_hit=0.1_100K_(20%_dups)*60M              │ 261.26 / 289.87 ±30.49 / 340.30 ms │ 263.13 / 278.51 ±17.76 / 311.47 ms │     no change │
│ QQuery 16_density=1_prob_hit=1_25*1.5M_RightSemi                    │        2.51 / 2.68 ±0.10 / 2.81 ms │     2.51 / 10.06 ±15.00 / 40.05 ms │  3.76x slower │
│ QQuery 17_density=1_prob_hit=1_100K*60M_RightSemi                   │     91.24 / 92.92 ±1.37 / 95.36 ms │   97.82 / 102.10 ±6.48 / 114.91 ms │  1.10x slower │
│ QQuery 18_density=1_prob_hit=0.1_100K*60M_RightSemi                 │  102.97 / 110.05 ±9.60 / 128.01 ms │  108.10 / 110.45 ±2.69 / 115.53 ms │     no change │
│ QQuery 19_density=1_prob_hit=1_25*1.5M_RightAnti                    │        1.92 / 2.05 ±0.08 / 2.15 ms │        1.97 / 2.04 ±0.06 / 2.13 ms │     no change │
│ QQuery 20_density=1_prob_hit=1_100K*60M_RightAnti                   │     83.88 / 85.06 ±1.82 / 88.64 ms │     85.57 / 87.25 ±1.08 / 88.82 ms │     no change │
│ QQuery 21_density=1_prob_hit=0.1_100K*60M_RightAnti                 │  113.40 / 115.51 ±2.04 / 117.98 ms │  117.98 / 118.97 ±1.08 / 120.44 ms │     no change │
│ QQuery 22_density=1_prob_hit=0.01_100K_(fanout_100)*60M_RightSemi   │     90.60 / 92.88 ±1.55 / 94.79 ms │     97.76 / 98.75 ±0.60 / 99.63 ms │  1.06x slower │
│ QQuery 23_density=1_prob_hit=1_32K_(fanout~78)*2.3M_long_keys_count │  170.99 / 172.34 ±1.22 / 174.47 ms │     74.83 / 75.16 ±0.29 / 75.68 ms │ +2.29x faster │
└─────────────────────────────────────────────────────────────────────┴────────────────────────────────────┴────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Benchmark Summary                              ┃           ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ Total Time (HEAD)                              │ 6625.96ms │
│ Total Time (perf_hash-join-no-take-in-probe)   │ 6609.17ms │
│ Average Time (HEAD)                            │  288.09ms │
│ Average Time (perf_hash-join-no-take-in-probe) │  287.36ms │
│ Queries Faster                                 │         1 │
│ Queries Slower                                 │         6 │
│ Queries with No Change                         │        16 │
│ Queries with Failure                           │         0 │
└────────────────────────────────────────────────┴───────────┘

Resource Usage

hj — base (merge-base)

Metric Value
Wall time 35.0s
Peak memory 2.3 GiB
Avg memory 1.3 GiB
CPU user 336.4s
CPU sys 12.5s
Peak spill 0 B

hj — branch

Metric Value
Wall time 35.0s
Peak memory 2.8 GiB
Avg memory 1.3 GiB
CPU user 338.5s
CPU sys 12.5s
Peak spill 0 B

File an issue against this benchmark runner

@LiaCastaneda

LiaCastaneda commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

│ QQuery 16_density=1_prob_hit=1_25*1.5M_RightSemi │ 2.51 / 2.68 ±0.10 / 2.81 ms │ 2.51 / 10.06 ±15.00 / 40.05 ms │ 3.76x slower │

It's strange this one regresses because it uses ArrayMap not JoinHashMap, this PR only touches the JoinHashMap path

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

physical-plan Changes to the physical-plan crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

High HashJoin probe latency under high fanout and key skew (Partitioned mode)

3 participants