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
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>
/// 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
@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

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