Skip to content

perf: Convert inner joins to semi joins when equivalent#22652

Open
neilconway wants to merge 9 commits into
apache:mainfrom
neilconway:neilc/perf-fd-convert-to-semi-join
Open

perf: Convert inner joins to semi joins when equivalent#22652
neilconway wants to merge 9 commits into
apache:mainfrom
neilconway:neilc/perf-fd-convert-to-semi-join

Conversation

@neilconway
Copy link
Copy Markdown
Contributor

@neilconway neilconway commented May 30, 2026

Which issue does this PR close?

Rationale for this change

This PR extends the EliminateJoin rewrite pass to replace inner joins with semi joins in some cases. An inner join L ⋈ R can be rewritten to a left semi join L ⋉ R if two conditions hold:

  1. None of R's columns are referenced above the join
  2. (a) each L row matches at most one R row, OR (b) the consumers of the join result are insensitive to duplicates

(And symmetrically with right semi joins.)

What changes are included in this PR?

  • Add for_each_referenced_index helper that is used by both EliminateJoin and EliminateProjections
  • Introduce LiveColumns type to track the "live" (referenced by parent) columns of a plan node
  • Add inner -> semi join rewrite to EliminateJoin
  • Add unit and SLT tests for rewrite behavior
  • Update SLT test fixtures for plan changes

Are these changes tested?

Yes; new tests added.

Are there any user-facing changes?

Some plan changes but no behavioral changes.

@neilconway
Copy link
Copy Markdown
Contributor Author

run benchmarks tpcds

@github-actions github-actions Bot added optimizer Optimizer rules sqllogictest SQL Logic Tests (.slt) labels May 30, 2026
@adriangbot
Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4583581776-374-57xj4 6.12.68+ #1 SMP Wed Apr 1 02:23:28 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 neilc/perf-fd-convert-to-semi-join (39eb398) to 2e7b8e1 (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 neilc_perf-fd-convert-to-semi-join
--------------------
Benchmark tpcds_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                  HEAD ┃    neilc_perf-fd-convert-to-semi-join ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 1  │           5.88 / 6.36 ±0.87 / 8.09 ms │           5.88 / 6.37 ±0.84 / 8.04 ms │     no change │
│ QQuery 2  │        83.85 / 84.09 ±0.16 / 84.34 ms │        81.07 / 81.37 ±0.30 / 81.93 ms │     no change │
│ QQuery 3  │        29.21 / 29.38 ±0.15 / 29.57 ms │        28.93 / 29.19 ±0.24 / 29.64 ms │     no change │
│ QQuery 4  │     500.03 / 505.73 ±3.64 / 509.52 ms │     500.62 / 508.07 ±4.31 / 512.96 ms │     no change │
│ QQuery 5  │        51.79 / 52.37 ±0.58 / 53.39 ms │        52.02 / 52.45 ±0.31 / 52.81 ms │     no change │
│ QQuery 6  │        36.90 / 37.30 ±0.22 / 37.56 ms │        36.71 / 37.35 ±0.34 / 37.69 ms │     no change │
│ QQuery 7  │       95.53 / 99.00 ±4.83 / 108.52 ms │       95.18 / 97.20 ±3.27 / 103.71 ms │     no change │
│ QQuery 8  │        37.41 / 37.74 ±0.21 / 38.02 ms │        37.33 / 37.87 ±0.41 / 38.53 ms │     no change │
│ QQuery 9  │        52.94 / 55.44 ±1.39 / 56.69 ms │        54.46 / 55.28 ±1.34 / 57.95 ms │     no change │
│ QQuery 10 │        69.05 / 69.65 ±0.34 / 70.10 ms │        71.19 / 71.41 ±0.20 / 71.72 ms │     no change │
│ QQuery 11 │     305.57 / 308.21 ±1.54 / 309.77 ms │     312.30 / 314.57 ±1.43 / 316.52 ms │     no change │
│ QQuery 12 │        28.79 / 29.05 ±0.30 / 29.64 ms │        28.73 / 29.19 ±0.28 / 29.52 ms │     no change │
│ QQuery 13 │     119.82 / 121.61 ±1.64 / 123.63 ms │     119.62 / 120.65 ±0.99 / 122.35 ms │     no change │
│ QQuery 14 │    503.08 / 512.86 ±12.20 / 536.80 ms │     434.41 / 436.01 ±1.15 / 437.98 ms │ +1.18x faster │
│ QQuery 15 │        59.46 / 61.70 ±2.44 / 66.41 ms │        60.27 / 60.73 ±0.35 / 61.21 ms │     no change │
│ QQuery 16 │          6.72 / 7.76 ±1.60 / 10.90 ms │           6.89 / 7.10 ±0.25 / 7.56 ms │ +1.09x faster │
│ QQuery 17 │        80.81 / 81.89 ±1.26 / 84.04 ms │        80.43 / 82.52 ±2.07 / 86.12 ms │     no change │
│ QQuery 18 │     125.26 / 126.59 ±0.90 / 127.44 ms │     125.61 / 127.33 ±1.02 / 128.34 ms │     no change │
│ QQuery 19 │        42.09 / 42.32 ±0.14 / 42.46 ms │        41.98 / 42.84 ±0.74 / 44.22 ms │     no change │
│ QQuery 20 │        36.32 / 36.75 ±0.31 / 37.11 ms │        35.98 / 38.05 ±2.50 / 42.92 ms │     no change │
│ QQuery 21 │        17.12 / 17.45 ±0.25 / 17.71 ms │        17.27 / 17.60 ±0.22 / 17.95 ms │     no change │
│ QQuery 22 │        63.23 / 63.65 ±0.34 / 64.18 ms │        63.17 / 63.78 ±0.39 / 64.34 ms │     no change │
│ QQuery 23 │     481.60 / 486.16 ±3.31 / 490.47 ms │     475.13 / 484.22 ±5.97 / 493.00 ms │     no change │
│ QQuery 24 │     223.93 / 228.08 ±4.13 / 235.57 ms │    226.76 / 234.79 ±10.07 / 253.97 ms │     no change │
│ QQuery 25 │     113.59 / 117.62 ±6.79 / 131.17 ms │     114.98 / 117.61 ±1.82 / 120.52 ms │     no change │
│ QQuery 26 │        58.99 / 59.44 ±0.33 / 59.94 ms │        58.59 / 61.74 ±3.89 / 67.77 ms │     no change │
│ QQuery 27 │           6.61 / 6.73 ±0.15 / 7.02 ms │           6.90 / 7.03 ±0.16 / 7.35 ms │     no change │
│ QQuery 28 │        61.39 / 61.63 ±0.19 / 61.86 ms │        57.64 / 60.32 ±1.91 / 62.38 ms │     no change │
│ QQuery 29 │      98.49 / 102.20 ±3.46 / 107.67 ms │       98.19 / 99.99 ±1.75 / 103.35 ms │     no change │
│ QQuery 30 │        33.01 / 33.38 ±0.52 / 34.40 ms │        33.58 / 36.53 ±2.37 / 40.55 ms │  1.09x slower │
│ QQuery 31 │     111.53 / 112.43 ±0.48 / 112.85 ms │     113.46 / 114.95 ±1.43 / 117.55 ms │     no change │
│ QQuery 32 │        20.57 / 21.58 ±1.22 / 23.94 ms │        20.79 / 21.07 ±0.26 / 21.56 ms │     no change │
│ QQuery 33 │        38.55 / 38.81 ±0.28 / 39.35 ms │        38.74 / 39.09 ±0.27 / 39.53 ms │     no change │
│ QQuery 34 │         9.87 / 10.26 ±0.34 / 10.86 ms │         9.84 / 11.89 ±3.76 / 19.39 ms │  1.16x slower │
│ QQuery 35 │        77.99 / 78.72 ±0.50 / 79.56 ms │        84.74 / 86.94 ±3.04 / 92.92 ms │  1.10x slower │
│ QQuery 36 │           5.83 / 5.96 ±0.16 / 6.28 ms │           6.05 / 6.18 ±0.16 / 6.48 ms │     no change │
│ QQuery 37 │           6.86 / 7.03 ±0.16 / 7.32 ms │           6.93 / 7.27 ±0.33 / 7.88 ms │     no change │
│ QQuery 38 │        63.49 / 65.37 ±1.87 / 68.54 ms │        65.30 / 66.24 ±0.97 / 67.95 ms │     no change │
│ QQuery 39 │       98.95 / 99.87 ±0.58 / 100.54 ms │     103.03 / 105.71 ±2.56 / 110.27 ms │  1.06x slower │
│ QQuery 40 │        23.35 / 23.59 ±0.13 / 23.72 ms │        23.88 / 24.47 ±0.35 / 24.90 ms │     no change │
│ QQuery 41 │        11.59 / 11.83 ±0.16 / 12.03 ms │        11.96 / 12.10 ±0.08 / 12.19 ms │     no change │
│ QQuery 42 │        24.11 / 24.50 ±0.28 / 24.82 ms │        24.50 / 24.77 ±0.36 / 25.44 ms │     no change │
│ QQuery 43 │           4.84 / 4.96 ±0.13 / 5.22 ms │           4.88 / 5.00 ±0.12 / 5.23 ms │     no change │
│ QQuery 44 │        10.79 / 12.36 ±2.91 / 18.18 ms │        10.92 / 10.97 ±0.05 / 11.06 ms │ +1.13x faster │
│ QQuery 45 │        39.07 / 40.63 ±1.55 / 43.28 ms │        39.80 / 40.11 ±0.28 / 40.51 ms │     no change │
│ QQuery 46 │        12.23 / 12.45 ±0.21 / 12.78 ms │        11.88 / 13.43 ±1.84 / 16.96 ms │  1.08x slower │
│ QQuery 47 │     236.87 / 242.06 ±6.08 / 253.35 ms │     239.01 / 244.23 ±5.06 / 252.86 ms │     no change │
│ QQuery 48 │        98.09 / 98.74 ±0.57 / 99.56 ms │        97.78 / 98.31 ±0.65 / 99.55 ms │     no change │
│ QQuery 49 │        77.60 / 80.15 ±3.96 / 88.03 ms │        78.68 / 84.07 ±6.05 / 94.48 ms │     no change │
│ QQuery 50 │        58.93 / 59.65 ±0.43 / 60.20 ms │        60.10 / 61.31 ±0.76 / 62.32 ms │     no change │
│ QQuery 51 │        92.69 / 95.75 ±2.80 / 99.57 ms │        95.04 / 96.05 ±0.83 / 96.94 ms │     no change │
│ QQuery 52 │        24.40 / 25.09 ±0.66 / 25.96 ms │        24.72 / 25.41 ±0.88 / 27.03 ms │     no change │
│ QQuery 53 │        30.03 / 30.37 ±0.22 / 30.62 ms │        29.97 / 31.87 ±3.36 / 38.57 ms │     no change │
│ QQuery 54 │        56.56 / 56.87 ±0.46 / 57.76 ms │        67.14 / 68.60 ±0.98 / 70.02 ms │  1.21x slower │
│ QQuery 55 │        24.01 / 24.30 ±0.32 / 24.93 ms │        24.05 / 24.48 ±0.35 / 25.07 ms │     no change │
│ QQuery 56 │        38.77 / 39.31 ±0.56 / 40.16 ms │        39.72 / 39.81 ±0.06 / 39.86 ms │     no change │
│ QQuery 57 │     176.71 / 179.38 ±3.17 / 185.17 ms │     179.72 / 183.21 ±4.55 / 192.18 ms │     no change │
│ QQuery 58 │     119.83 / 120.49 ±0.60 / 121.42 ms │     118.81 / 120.45 ±1.81 / 123.80 ms │     no change │
│ QQuery 59 │     120.57 / 121.68 ±1.96 / 125.58 ms │     118.02 / 118.45 ±0.40 / 119.07 ms │     no change │
│ QQuery 60 │        39.05 / 39.90 ±0.73 / 41.10 ms │        39.64 / 41.26 ±2.14 / 45.48 ms │     no change │
│ QQuery 61 │        12.51 / 12.63 ±0.11 / 12.82 ms │        12.89 / 12.99 ±0.09 / 13.11 ms │     no change │
│ QQuery 62 │        46.03 / 46.50 ±0.35 / 47.04 ms │        46.89 / 47.23 ±0.27 / 47.59 ms │     no change │
│ QQuery 63 │        30.00 / 30.29 ±0.16 / 30.46 ms │        29.78 / 29.88 ±0.11 / 30.07 ms │     no change │
│ QQuery 64 │    395.34 / 406.51 ±10.69 / 420.20 ms │    308.27 / 323.70 ±11.92 / 337.79 ms │ +1.26x faster │
│ QQuery 65 │     144.94 / 147.69 ±2.22 / 151.74 ms │     142.76 / 144.02 ±0.90 / 145.42 ms │     no change │
│ QQuery 66 │        79.42 / 79.91 ±0.38 / 80.45 ms │        80.80 / 85.56 ±5.80 / 95.81 ms │  1.07x slower │
│ QQuery 67 │     253.59 / 260.67 ±4.66 / 267.38 ms │     258.21 / 263.86 ±5.75 / 271.13 ms │     no change │
│ QQuery 68 │        11.85 / 12.00 ±0.18 / 12.35 ms │        11.90 / 12.06 ±0.12 / 12.21 ms │     no change │
│ QQuery 69 │        63.66 / 64.05 ±0.34 / 64.53 ms │        65.01 / 71.70 ±7.31 / 81.31 ms │  1.12x slower │
│ QQuery 70 │     107.16 / 114.79 ±6.73 / 124.33 ms │     106.61 / 111.06 ±4.50 / 119.53 ms │     no change │
│ QQuery 71 │        36.04 / 36.53 ±0.70 / 37.90 ms │        35.15 / 35.79 ±0.43 / 36.34 ms │     no change │
│ QQuery 72 │ 2136.47 / 2205.41 ±52.63 / 2277.75 ms │ 2149.93 / 2231.16 ±53.78 / 2319.41 ms │     no change │
│ QQuery 73 │          9.54 / 9.85 ±0.21 / 10.05 ms │         9.35 / 11.90 ±4.72 / 21.34 ms │  1.21x slower │
│ QQuery 74 │     183.88 / 188.42 ±5.31 / 198.16 ms │     174.42 / 180.76 ±4.96 / 189.73 ms │     no change │
│ QQuery 75 │     149.99 / 153.48 ±3.75 / 160.62 ms │     149.13 / 151.48 ±2.51 / 156.00 ms │     no change │
│ QQuery 76 │        36.58 / 39.16 ±4.44 / 48.02 ms │        35.72 / 36.11 ±0.23 / 36.33 ms │ +1.08x faster │
│ QQuery 77 │        60.22 / 60.88 ±0.54 / 61.49 ms │        61.38 / 65.48 ±3.93 / 70.57 ms │  1.08x slower │
│ QQuery 78 │     190.21 / 195.04 ±4.34 / 202.86 ms │     189.67 / 196.82 ±7.47 / 210.91 ms │     no change │
│ QQuery 79 │        67.77 / 67.98 ±0.30 / 68.59 ms │        67.78 / 68.22 ±0.40 / 68.74 ms │     no change │
│ QQuery 80 │     101.04 / 103.35 ±1.85 / 106.43 ms │     100.83 / 101.81 ±0.96 / 103.45 ms │     no change │
│ QQuery 81 │        25.80 / 26.14 ±0.19 / 26.39 ms │        26.47 / 29.22 ±4.49 / 38.11 ms │  1.12x slower │
│ QQuery 82 │        16.68 / 17.37 ±1.06 / 19.48 ms │        16.35 / 17.18 ±0.95 / 18.98 ms │     no change │
│ QQuery 83 │        39.57 / 39.95 ±0.32 / 40.49 ms │        40.51 / 41.24 ±0.51 / 41.86 ms │     no change │
│ QQuery 84 │        34.73 / 35.18 ±0.35 / 35.68 ms │        35.21 / 35.43 ±0.19 / 35.71 ms │     no change │
│ QQuery 85 │     110.43 / 115.52 ±4.98 / 123.79 ms │     108.81 / 111.55 ±4.37 / 120.24 ms │     no change │
│ QQuery 86 │        25.22 / 25.78 ±0.29 / 26.06 ms │        25.39 / 25.66 ±0.22 / 25.93 ms │     no change │
│ QQuery 87 │        64.65 / 66.07 ±2.11 / 70.28 ms │        66.99 / 67.64 ±0.52 / 68.53 ms │     no change │
│ QQuery 88 │        62.75 / 63.31 ±0.51 / 64.07 ms │        62.22 / 62.99 ±0.54 / 63.84 ms │     no change │
│ QQuery 89 │        35.64 / 35.97 ±0.17 / 36.11 ms │        36.43 / 37.98 ±1.78 / 41.46 ms │  1.06x slower │
│ QQuery 90 │        17.13 / 17.24 ±0.06 / 17.32 ms │        17.30 / 17.48 ±0.19 / 17.83 ms │     no change │
│ QQuery 91 │        45.59 / 45.99 ±0.26 / 46.28 ms │        45.46 / 45.93 ±0.29 / 46.21 ms │     no change │
│ QQuery 92 │        29.37 / 30.11 ±0.41 / 30.59 ms │        30.37 / 30.95 ±0.32 / 31.23 ms │     no change │
│ QQuery 93 │        51.68 / 52.05 ±0.20 / 52.28 ms │        52.11 / 52.69 ±0.42 / 53.39 ms │     no change │
│ QQuery 94 │        38.62 / 39.09 ±0.32 / 39.56 ms │        40.01 / 42.38 ±2.48 / 45.47 ms │  1.08x slower │
│ QQuery 95 │        83.71 / 84.33 ±0.39 / 84.92 ms │        84.08 / 85.97 ±1.74 / 88.75 ms │     no change │
│ QQuery 96 │        24.19 / 24.47 ±0.20 / 24.68 ms │        24.56 / 24.88 ±0.18 / 25.05 ms │     no change │
│ QQuery 97 │        45.66 / 48.20 ±2.01 / 51.09 ms │        50.21 / 50.64 ±0.28 / 50.95 ms │  1.05x slower │
│ QQuery 98 │        42.61 / 43.75 ±0.78 / 44.93 ms │        43.08 / 45.25 ±1.99 / 48.82 ms │     no change │
│ QQuery 99 │        70.10 / 70.41 ±0.19 / 70.65 ms │        70.47 / 70.85 ±0.28 / 71.17 ms │     no change │
└───────────┴───────────────────────────────────────┴───────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                                 ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                                 │ 10382.31ms │
│ Total Time (neilc_perf-fd-convert-to-semi-join)   │ 10324.36ms │
│ Average Time (HEAD)                               │   104.87ms │
│ Average Time (neilc_perf-fd-convert-to-semi-join) │   104.29ms │
│ Queries Faster                                    │          5 │
│ Queries Slower                                    │         14 │
│ Queries with No Change                            │         80 │
│ Queries with Failure                              │          0 │
└───────────────────────────────────────────────────┴────────────┘

Resource Usage

tpcds — base (merge-base)

Metric Value
Wall time 55.0s
Peak memory 7.0 GiB
Avg memory 6.3 GiB
CPU user 239.6s
CPU sys 6.8s
Peak spill 0 B

tpcds — branch

Metric Value
Wall time 55.0s
Peak memory 6.9 GiB
Avg memory 6.0 GiB
CPU user 240.8s
CPU sys 7.0s
Peak spill 0 B

File an issue against this benchmark runner

@neilconway neilconway marked this pull request as ready for review May 31, 2026 13:33
Comment on lines +80 to +83
/// The columns that are "live" at a plan node, i.e., which of its output
/// columns are referenced by an ancestor node. Represented as a set of column
/// indices, relative to the node's schema.
type LiveColumns = HashSet<usize>;
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.

  1. This is similar but not identical to the RequiredIndices data structure used by OptimizeProjections. RequiredIndices cares about insertion order but we don't, so it seemed cleaner to use a different data structure here.
  2. It would be better to use a bitmap than a HashSet. We could do so by adding a dependency on a third-party bitmap implementation (e.g., https://github.com/petgraph/fixedbitset, which one of our indirect dependencies already pulls in). But the performance impact should be small, so I'm not sure it's worth adding the dep.

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.

You could potentially use arrow BooleanBufferBuilder as a mutable bitset: https://docs.rs/arrow/latest/arrow/array/struct.BooleanBufferBuilder.html

Not sure if that is actually faster or not

@neilconway
Copy link
Copy Markdown
Contributor Author

Digging into some of the TPC-DS query plan changes, we ran into two different planner bugs: #22679 and #22674. This PR will also benefit (on TPC-DS and TPC-H) from landing #22646

@Dandandan
Copy link
Copy Markdown
Contributor

run benchmarks

@Dandandan
Copy link
Copy Markdown
Contributor

run benchmark tpch10

@adriangbot
Copy link
Copy Markdown

Benchmark for this request failed.

Last 20 lines of output:

Click to expand
Cloning into '/workspace/datafusion-branch'...
From https://github.com/apache/datafusion
 * [new ref]         refs/pull/22652/head -> neilc/perf-fd-convert-to-semi-join
 * branch            main                 -> FETCH_HEAD
Switched to branch 'neilc/perf-fd-convert-to-semi-join'
5c92390921d8d667aa7cb7d56276a59ba36926f4
Cloning into '/workspace/datafusion-base'...
HEAD is now at 5c92390 perf(optimizer): EliminateCrossJoin fast-path for join-free plans (#22612)
rustc 1.95.0 (59807616e 2026-04-14)
2daef07cdf11d845914ca30f313693b5c53ab101
5c92390921d8d667aa7cb7d56276a59ba36926f4

File an issue against this benchmark runner

@adriangbot
Copy link
Copy Markdown

Benchmark for this request failed.

Last 20 lines of output:

Click to expand
Cloning into '/workspace/datafusion-branch'...
From https://github.com/apache/datafusion
 * [new ref]         refs/pull/22652/head -> neilc/perf-fd-convert-to-semi-join
 * branch            main                 -> FETCH_HEAD
Switched to branch 'neilc/perf-fd-convert-to-semi-join'
5c92390921d8d667aa7cb7d56276a59ba36926f4
Cloning into '/workspace/datafusion-base'...
HEAD is now at 5c92390 perf(optimizer): EliminateCrossJoin fast-path for join-free plans (#22612)
rustc 1.95.0 (59807616e 2026-04-14)
2daef07cdf11d845914ca30f313693b5c53ab101
5c92390921d8d667aa7cb7d56276a59ba36926f4

File an issue against this benchmark runner

@adriangbot
Copy link
Copy Markdown

Benchmark for this request failed.

Last 20 lines of output:

Click to expand
Cloning into '/workspace/datafusion-branch'...
From https://github.com/apache/datafusion
 * [new ref]         refs/pull/22652/head -> neilc/perf-fd-convert-to-semi-join
 * branch            main                 -> FETCH_HEAD
Switched to branch 'neilc/perf-fd-convert-to-semi-join'
5c92390921d8d667aa7cb7d56276a59ba36926f4
Cloning into '/workspace/datafusion-base'...
HEAD is now at 5c92390 perf(optimizer): EliminateCrossJoin fast-path for join-free plans (#22612)
rustc 1.95.0 (59807616e 2026-04-14)
2daef07cdf11d845914ca30f313693b5c53ab101
5c92390921d8d667aa7cb7d56276a59ba36926f4

File an issue against this benchmark runner

@Dandandan
Copy link
Copy Markdown
Contributor

@neilconway FYI quite some plans changed now 🚀

Can you take a look at the PR

@neilconway
Copy link
Copy Markdown
Contributor Author

run benchmarks

@adriangbot
Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4603881427-404-pgljs 6.12.68+ #1 SMP Wed Apr 1 02:23:28 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 neilc/perf-fd-convert-to-semi-join (6b1d38a) to 7843ab3 (merge-base) diff using: clickbench_partitioned
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-c4603881427-405-5jfvt 6.12.68+ #1 SMP Wed Apr 1 02:23:28 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 neilc/perf-fd-convert-to-semi-join (6b1d38a) to 7843ab3 (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-c4603881427-406-48w5q 6.12.68+ #1 SMP Wed Apr 1 02:23:28 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 neilc/perf-fd-convert-to-semi-join (6b1d38a) to 7843ab3 (merge-base) diff using: tpch
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 neilc_perf-fd-convert-to-semi-join
--------------------
Benchmark tpch_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                           HEAD ┃ neilc_perf-fd-convert-to-semi-join ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 1  │ 38.16 / 40.11 ±1.09 / 41.38 ms │     38.02 / 40.13 ±1.12 / 41.31 ms │     no change │
│ QQuery 2  │ 18.26 / 18.66 ±0.32 / 19.19 ms │     18.29 / 18.52 ±0.21 / 18.91 ms │     no change │
│ QQuery 3  │ 31.31 / 32.69 ±0.78 / 33.39 ms │     30.88 / 32.58 ±2.20 / 36.92 ms │     no change │
│ QQuery 4  │ 17.06 / 18.16 ±1.08 / 20.05 ms │     17.01 / 17.16 ±0.12 / 17.37 ms │ +1.06x faster │
│ QQuery 5  │ 37.71 / 39.84 ±1.81 / 42.40 ms │     37.86 / 39.89 ±1.87 / 43.11 ms │     no change │
│ QQuery 6  │ 15.84 / 15.95 ±0.13 / 16.17 ms │     15.98 / 16.19 ±0.13 / 16.35 ms │     no change │
│ QQuery 7  │ 44.07 / 45.81 ±1.52 / 48.47 ms │     43.90 / 45.41 ±1.09 / 46.55 ms │     no change │
│ QQuery 8  │ 42.66 / 43.61 ±1.15 / 45.87 ms │     42.66 / 43.38 ±0.81 / 44.96 ms │     no change │
│ QQuery 9  │ 48.43 / 49.89 ±1.00 / 51.46 ms │     49.15 / 49.88 ±0.65 / 50.68 ms │     no change │
│ QQuery 10 │ 41.84 / 42.51 ±1.26 / 45.03 ms │     41.63 / 42.22 ±0.93 / 44.08 ms │     no change │
│ QQuery 11 │ 13.13 / 13.26 ±0.10 / 13.40 ms │     13.30 / 13.85 ±0.34 / 14.17 ms │     no change │
│ QQuery 12 │ 23.87 / 24.39 ±0.34 / 24.89 ms │     24.04 / 24.85 ±1.16 / 27.08 ms │     no change │
│ QQuery 13 │ 31.86 / 34.35 ±3.33 / 40.93 ms │     31.47 / 33.89 ±1.48 / 35.51 ms │     no change │
│ QQuery 14 │ 23.50 / 23.74 ±0.15 / 23.92 ms │     23.50 / 23.75 ±0.35 / 24.41 ms │     no change │
│ QQuery 15 │ 30.94 / 31.79 ±0.88 / 33.18 ms │     31.09 / 32.18 ±1.36 / 34.73 ms │     no change │
│ QQuery 16 │ 13.92 / 14.16 ±0.25 / 14.58 ms │     13.84 / 13.99 ±0.15 / 14.25 ms │     no change │
│ QQuery 17 │ 72.18 / 72.78 ±0.70 / 74.09 ms │     71.95 / 72.65 ±0.37 / 73.04 ms │     no change │
│ QQuery 18 │ 56.88 / 59.62 ±2.45 / 63.89 ms │     58.34 / 60.12 ±1.93 / 63.55 ms │     no change │
│ QQuery 19 │ 33.22 / 34.57 ±2.01 / 38.55 ms │     32.78 / 32.96 ±0.24 / 33.42 ms │     no change │
│ QQuery 20 │ 32.12 / 32.45 ±0.43 / 33.26 ms │     31.67 / 32.16 ±0.58 / 33.29 ms │     no change │
│ QQuery 21 │ 55.39 / 56.23 ±0.61 / 56.89 ms │     54.73 / 57.24 ±1.35 / 58.84 ms │     no change │
│ QQuery 22 │ 13.38 / 13.76 ±0.27 / 14.20 ms │     13.57 / 13.82 ±0.21 / 14.14 ms │     no change │
└───────────┴────────────────────────────────┴────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┓
┃ Benchmark Summary                                 ┃          ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━┩
│ Total Time (HEAD)                                 │ 758.33ms │
│ Total Time (neilc_perf-fd-convert-to-semi-join)   │ 756.81ms │
│ Average Time (HEAD)                               │  34.47ms │
│ Average Time (neilc_perf-fd-convert-to-semi-join) │  34.40ms │
│ Queries Faster                                    │        1 │
│ Queries Slower                                    │        0 │
│ Queries with No Change                            │       21 │
│ Queries with Failure                              │        0 │
└───────────────────────────────────────────────────┴──────────┘

Resource Usage

tpch — base (merge-base)

Metric Value
Wall time 5.0s
Peak memory 5.7 GiB
Avg memory 4.9 GiB
CPU user 29.6s
CPU sys 2.2s
Peak spill 0 B

tpch — branch

Metric Value
Wall time 5.0s
Peak memory 5.6 GiB
Avg memory 4.9 GiB
CPU user 29.8s
CPU sys 2.2s
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 neilc_perf-fd-convert-to-semi-join
--------------------
Benchmark tpcds_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                  HEAD ┃    neilc_perf-fd-convert-to-semi-join ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 1  │           5.91 / 6.37 ±0.83 / 8.03 ms │           5.35 / 5.84 ±0.77 / 7.38 ms │ +1.09x faster │
│ QQuery 2  │        81.53 / 81.88 ±0.34 / 82.41 ms │        81.02 / 81.23 ±0.19 / 81.57 ms │     no change │
│ QQuery 3  │        29.05 / 29.25 ±0.17 / 29.50 ms │        28.65 / 29.04 ±0.33 / 29.47 ms │     no change │
│ QQuery 4  │     482.24 / 489.58 ±6.67 / 499.96 ms │     488.39 / 491.82 ±2.82 / 495.82 ms │     no change │
│ QQuery 5  │        51.99 / 52.85 ±1.24 / 55.23 ms │        52.15 / 52.78 ±0.45 / 53.55 ms │     no change │
│ QQuery 6  │        36.51 / 36.94 ±0.25 / 37.25 ms │        37.93 / 38.19 ±0.39 / 38.96 ms │     no change │
│ QQuery 7  │        96.13 / 96.62 ±0.40 / 97.26 ms │        95.29 / 95.97 ±0.38 / 96.44 ms │     no change │
│ QQuery 8  │        37.12 / 38.77 ±2.92 / 44.60 ms │        37.68 / 39.38 ±2.38 / 44.04 ms │     no change │
│ QQuery 9  │        53.04 / 54.78 ±1.38 / 56.75 ms │        53.05 / 55.10 ±1.87 / 57.65 ms │     no change │
│ QQuery 10 │        68.55 / 68.94 ±0.32 / 69.35 ms │        70.65 / 70.89 ±0.18 / 71.10 ms │     no change │
│ QQuery 11 │     296.98 / 303.11 ±4.47 / 307.54 ms │     299.21 / 305.66 ±6.37 / 317.88 ms │     no change │
│ QQuery 12 │        28.65 / 29.06 ±0.34 / 29.58 ms │        28.98 / 29.51 ±0.44 / 30.30 ms │     no change │
│ QQuery 13 │     119.58 / 121.00 ±1.45 / 123.60 ms │     119.09 / 120.34 ±1.19 / 122.40 ms │     no change │
│ QQuery 14 │     508.14 / 509.13 ±1.09 / 511.11 ms │     439.21 / 445.24 ±3.41 / 449.50 ms │ +1.14x faster │
│ QQuery 15 │        59.46 / 60.22 ±1.11 / 62.41 ms │        59.45 / 59.74 ±0.29 / 60.16 ms │     no change │
│ QQuery 16 │           6.74 / 6.89 ±0.14 / 7.14 ms │           6.39 / 6.54 ±0.15 / 6.77 ms │     no change │
│ QQuery 17 │        81.44 / 83.60 ±3.33 / 90.23 ms │        79.94 / 81.46 ±1.93 / 85.28 ms │     no change │
│ QQuery 18 │     125.81 / 126.96 ±0.81 / 127.95 ms │     124.59 / 126.03 ±1.34 / 128.36 ms │     no change │
│ QQuery 19 │        42.14 / 42.59 ±0.62 / 43.83 ms │        42.41 / 43.33 ±1.12 / 45.46 ms │     no change │
│ QQuery 20 │        35.71 / 36.32 ±0.49 / 37.15 ms │        35.94 / 37.42 ±1.83 / 40.84 ms │     no change │
│ QQuery 21 │        17.06 / 17.40 ±0.29 / 17.87 ms │        17.22 / 17.46 ±0.18 / 17.73 ms │     no change │
│ QQuery 22 │        62.18 / 62.82 ±0.65 / 63.62 ms │        64.09 / 64.73 ±0.66 / 65.97 ms │     no change │
│ QQuery 23 │     344.25 / 347.44 ±3.35 / 353.70 ms │     353.88 / 358.01 ±4.86 / 367.13 ms │     no change │
│ QQuery 24 │     224.45 / 227.70 ±2.04 / 230.33 ms │     226.28 / 230.16 ±3.19 / 235.16 ms │     no change │
│ QQuery 25 │     114.11 / 117.10 ±3.27 / 121.89 ms │     112.63 / 113.81 ±0.78 / 114.73 ms │     no change │
│ QQuery 26 │        58.32 / 58.75 ±0.28 / 59.01 ms │        57.67 / 59.31 ±2.16 / 63.50 ms │     no change │
│ QQuery 27 │           6.69 / 6.86 ±0.17 / 7.14 ms │           6.04 / 6.15 ±0.18 / 6.51 ms │ +1.11x faster │
│ QQuery 28 │        56.14 / 58.86 ±2.26 / 61.17 ms │        61.11 / 61.57 ±0.39 / 62.17 ms │     no change │
│ QQuery 29 │      98.70 / 102.35 ±2.19 / 104.75 ms │       96.57 / 98.94 ±2.46 / 102.50 ms │     no change │
│ QQuery 30 │        32.01 / 32.64 ±0.57 / 33.69 ms │        32.15 / 32.79 ±0.61 / 33.86 ms │     no change │
│ QQuery 31 │     111.26 / 112.40 ±0.89 / 113.99 ms │     111.60 / 112.26 ±0.39 / 112.69 ms │     no change │
│ QQuery 32 │        20.26 / 20.56 ±0.23 / 20.87 ms │        20.35 / 21.54 ±1.58 / 24.64 ms │     no change │
│ QQuery 33 │        38.67 / 39.20 ±0.47 / 39.94 ms │        38.31 / 40.33 ±2.58 / 45.27 ms │     no change │
│ QQuery 34 │           9.44 / 9.56 ±0.17 / 9.87 ms │          9.42 / 9.92 ±0.51 / 10.73 ms │     no change │
│ QQuery 35 │        76.39 / 77.05 ±0.46 / 77.72 ms │        80.47 / 80.86 ±0.30 / 81.37 ms │     no change │
│ QQuery 36 │           5.98 / 6.08 ±0.13 / 6.34 ms │           5.56 / 5.73 ±0.16 / 6.02 ms │ +1.06x faster │
│ QQuery 37 │           6.80 / 6.87 ±0.06 / 6.94 ms │           6.75 / 6.83 ±0.06 / 6.92 ms │     no change │
│ QQuery 38 │        63.21 / 63.78 ±0.49 / 64.63 ms │        63.45 / 63.60 ±0.17 / 63.88 ms │     no change │
│ QQuery 39 │     455.07 / 461.24 ±6.31 / 472.99 ms │     453.44 / 461.88 ±5.82 / 469.32 ms │     no change │
│ QQuery 40 │        23.40 / 23.55 ±0.11 / 23.69 ms │        23.10 / 23.37 ±0.25 / 23.84 ms │     no change │
│ QQuery 41 │        11.33 / 11.48 ±0.20 / 11.87 ms │        11.35 / 11.50 ±0.17 / 11.81 ms │     no change │
│ QQuery 42 │        23.77 / 24.01 ±0.25 / 24.44 ms │        23.90 / 24.12 ±0.20 / 24.50 ms │     no change │
│ QQuery 43 │           4.96 / 5.03 ±0.09 / 5.21 ms │           4.83 / 4.93 ±0.11 / 5.14 ms │     no change │
│ QQuery 44 │        10.69 / 10.86 ±0.11 / 11.03 ms │        10.65 / 10.84 ±0.14 / 11.06 ms │     no change │
│ QQuery 45 │        38.82 / 42.12 ±4.00 / 48.54 ms │        38.62 / 39.18 ±0.51 / 40.00 ms │ +1.07x faster │
│ QQuery 46 │        11.95 / 12.38 ±0.35 / 12.78 ms │        11.37 / 13.56 ±3.67 / 20.88 ms │  1.10x slower │
│ QQuery 47 │     228.82 / 237.15 ±8.00 / 251.53 ms │     229.58 / 232.48 ±2.88 / 237.75 ms │     no change │
│ QQuery 48 │        97.98 / 98.31 ±0.34 / 98.95 ms │        97.79 / 98.25 ±0.24 / 98.44 ms │     no change │
│ QQuery 49 │        77.90 / 79.07 ±1.03 / 80.36 ms │        75.37 / 76.29 ±0.71 / 77.36 ms │     no change │
│ QQuery 50 │        60.06 / 60.67 ±0.43 / 61.17 ms │        58.68 / 62.11 ±4.31 / 70.59 ms │     no change │
│ QQuery 51 │        91.85 / 93.42 ±1.34 / 95.54 ms │        93.63 / 95.45 ±2.30 / 99.87 ms │     no change │
│ QQuery 52 │        24.36 / 27.49 ±5.72 / 38.93 ms │        24.19 / 24.61 ±0.26 / 24.96 ms │ +1.12x faster │
│ QQuery 53 │        29.93 / 30.49 ±0.47 / 31.11 ms │        29.36 / 30.50 ±1.85 / 34.15 ms │     no change │
│ QQuery 54 │        55.88 / 56.45 ±0.45 / 57.15 ms │        59.18 / 60.97 ±2.58 / 66.09 ms │  1.08x slower │
│ QQuery 55 │        23.66 / 23.94 ±0.20 / 24.27 ms │        24.80 / 25.24 ±0.34 / 25.64 ms │  1.05x slower │
│ QQuery 56 │        39.36 / 39.66 ±0.29 / 40.14 ms │        38.83 / 39.54 ±0.65 / 40.57 ms │     no change │
│ QQuery 57 │     177.37 / 180.54 ±4.39 / 189.11 ms │     179.17 / 182.70 ±3.27 / 188.28 ms │     no change │
│ QQuery 58 │     117.96 / 118.89 ±0.78 / 120.06 ms │     118.07 / 119.97 ±3.33 / 126.63 ms │     no change │
│ QQuery 59 │     117.58 / 118.27 ±0.53 / 119.13 ms │     117.64 / 118.91 ±0.82 / 120.08 ms │     no change │
│ QQuery 60 │        39.81 / 42.18 ±2.10 / 46.02 ms │        39.39 / 40.13 ±0.60 / 40.87 ms │     no change │
│ QQuery 61 │        13.26 / 13.47 ±0.18 / 13.77 ms │        11.87 / 12.03 ±0.18 / 12.36 ms │ +1.12x faster │
│ QQuery 62 │        46.55 / 46.80 ±0.24 / 47.11 ms │        48.50 / 50.37 ±3.54 / 57.45 ms │  1.08x slower │
│ QQuery 63 │        29.68 / 30.02 ±0.18 / 30.20 ms │        29.64 / 30.77 ±1.18 / 33.01 ms │     no change │
│ QQuery 64 │     399.67 / 406.48 ±5.64 / 415.41 ms │     416.48 / 417.98 ±1.56 / 420.05 ms │     no change │
│ QQuery 65 │     146.32 / 150.97 ±4.38 / 157.42 ms │     150.86 / 153.24 ±2.38 / 157.81 ms │     no change │
│ QQuery 66 │        80.05 / 80.64 ±0.50 / 81.49 ms │        79.75 / 80.86 ±1.75 / 84.30 ms │     no change │
│ QQuery 67 │     245.84 / 253.33 ±6.11 / 260.74 ms │     245.11 / 250.61 ±6.17 / 259.53 ms │     no change │
│ QQuery 68 │        11.93 / 14.28 ±4.35 / 22.97 ms │        11.49 / 11.68 ±0.22 / 12.12 ms │ +1.22x faster │
│ QQuery 69 │        62.71 / 63.49 ±0.49 / 64.19 ms │        64.76 / 66.03 ±1.44 / 68.81 ms │     no change │
│ QQuery 70 │     105.03 / 106.60 ±1.08 / 107.83 ms │     108.68 / 112.40 ±4.10 / 120.27 ms │  1.05x slower │
│ QQuery 71 │        35.93 / 40.21 ±6.77 / 53.66 ms │        35.86 / 36.35 ±0.34 / 36.76 ms │ +1.11x faster │
│ QQuery 72 │ 2180.04 / 2260.82 ±81.28 / 2402.80 ms │ 2098.65 / 2192.07 ±51.73 / 2248.50 ms │     no change │
│ QQuery 73 │           9.18 / 9.47 ±0.24 / 9.90 ms │           9.20 / 9.38 ±0.28 / 9.93 ms │     no change │
│ QQuery 74 │     169.87 / 175.30 ±8.14 / 191.45 ms │     168.81 / 172.36 ±2.51 / 175.69 ms │     no change │
│ QQuery 75 │     147.88 / 149.66 ±1.22 / 151.38 ms │     147.98 / 151.59 ±5.67 / 162.77 ms │     no change │
│ QQuery 76 │        35.56 / 36.31 ±0.40 / 36.78 ms │        35.14 / 35.75 ±0.45 / 36.42 ms │     no change │
│ QQuery 77 │        60.94 / 61.57 ±0.46 / 62.12 ms │        61.38 / 64.84 ±4.56 / 73.80 ms │  1.05x slower │
│ QQuery 78 │     188.89 / 195.10 ±7.06 / 207.96 ms │     190.28 / 192.88 ±1.91 / 195.96 ms │     no change │
│ QQuery 79 │        67.28 / 67.69 ±0.24 / 67.97 ms │        68.31 / 69.43 ±1.21 / 71.79 ms │     no change │
│ QQuery 80 │     101.35 / 107.06 ±5.45 / 114.93 ms │      99.20 / 100.32 ±0.84 / 101.21 ms │ +1.07x faster │
│ QQuery 81 │        25.80 / 26.01 ±0.21 / 26.27 ms │        25.47 / 26.17 ±1.03 / 28.18 ms │     no change │
│ QQuery 82 │        16.09 / 16.31 ±0.16 / 16.55 ms │        16.56 / 17.38 ±1.05 / 19.38 ms │  1.07x slower │
│ QQuery 83 │        39.59 / 39.98 ±0.39 / 40.63 ms │        39.81 / 40.81 ±1.04 / 42.54 ms │     no change │
│ QQuery 84 │        34.27 / 34.49 ±0.19 / 34.75 ms │        34.51 / 34.85 ±0.27 / 35.22 ms │     no change │
│ QQuery 85 │     108.72 / 112.44 ±5.08 / 122.36 ms │     107.43 / 109.33 ±2.52 / 114.28 ms │     no change │
│ QQuery 86 │        25.07 / 25.26 ±0.21 / 25.66 ms │        26.85 / 27.05 ±0.16 / 27.34 ms │  1.07x slower │
│ QQuery 87 │        63.23 / 63.58 ±0.40 / 64.08 ms │        63.82 / 65.36 ±1.91 / 68.90 ms │     no change │
│ QQuery 88 │        62.06 / 64.44 ±3.22 / 70.83 ms │        65.21 / 65.69 ±0.29 / 66.05 ms │     no change │
│ QQuery 89 │        35.75 / 36.35 ±0.37 / 36.91 ms │        35.86 / 37.69 ±2.69 / 43.03 ms │     no change │
│ QQuery 90 │        16.68 / 16.91 ±0.21 / 17.23 ms │        17.36 / 17.59 ±0.21 / 17.91 ms │     no change │
│ QQuery 91 │        44.76 / 45.10 ±0.28 / 45.50 ms │        44.82 / 45.28 ±0.29 / 45.64 ms │     no change │
│ QQuery 92 │        28.88 / 29.10 ±0.21 / 29.45 ms │        30.45 / 30.86 ±0.31 / 31.32 ms │  1.06x slower │
│ QQuery 93 │        51.31 / 53.93 ±3.43 / 60.44 ms │        49.94 / 51.24 ±0.74 / 52.23 ms │     no change │
│ QQuery 94 │        38.75 / 39.19 ±0.47 / 40.08 ms │        39.28 / 39.63 ±0.26 / 39.97 ms │     no change │
│ QQuery 95 │        83.25 / 83.65 ±0.24 / 83.94 ms │        82.59 / 83.79 ±1.81 / 87.38 ms │     no change │
│ QQuery 96 │        23.83 / 24.15 ±0.22 / 24.49 ms │        24.97 / 25.22 ±0.26 / 25.61 ms │     no change │
│ QQuery 97 │        46.08 / 47.97 ±2.68 / 53.29 ms │        49.69 / 50.00 ±0.44 / 50.85 ms │     no change │
│ QQuery 98 │        42.52 / 43.50 ±0.79 / 44.73 ms │        42.87 / 43.28 ±0.44 / 44.05 ms │     no change │
│ QQuery 99 │        69.65 / 70.34 ±0.47 / 71.00 ms │        72.85 / 74.47 ±2.28 / 78.93 ms │  1.06x slower │
└───────────┴───────────────────────────────────────┴───────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                                 ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                                 │ 10581.45ms │
│ Total Time (neilc_perf-fd-convert-to-semi-join)   │ 10492.69ms │
│ Average Time (HEAD)                               │   106.88ms │
│ Average Time (neilc_perf-fd-convert-to-semi-join) │   105.99ms │
│ Queries Faster                                    │         10 │
│ Queries Slower                                    │         10 │
│ Queries with No Change                            │         79 │
│ Queries with Failure                              │          0 │
└───────────────────────────────────────────────────┴────────────┘

Resource Usage

tpcds — base (merge-base)

Metric Value
Wall time 55.0s
Peak memory 6.6 GiB
Avg memory 6.1 GiB
CPU user 242.4s
CPU sys 6.5s
Peak spill 0 B

tpcds — branch

Metric Value
Wall time 55.0s
Peak memory 6.6 GiB
Avg memory 6.1 GiB
CPU user 241.4s
CPU sys 6.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 neilc_perf-fd-convert-to-semi-join
--------------------
Benchmark clickbench_partitioned.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                  HEAD ┃    neilc_perf-fd-convert-to-semi-join ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 0  │          1.17 / 3.36 ±4.33 / 12.02 ms │          1.20 / 3.33 ±4.17 / 11.66 ms │     no change │
│ QQuery 1  │        12.40 / 12.52 ±0.06 / 12.59 ms │        12.17 / 12.51 ±0.21 / 12.71 ms │     no change │
│ QQuery 2  │        35.25 / 35.52 ±0.26 / 35.99 ms │        35.54 / 35.82 ±0.22 / 36.17 ms │     no change │
│ QQuery 3  │        30.68 / 31.50 ±1.06 / 33.55 ms │        30.75 / 31.02 ±0.41 / 31.84 ms │     no change │
│ QQuery 4  │     224.47 / 227.31 ±2.81 / 232.24 ms │     224.17 / 226.29 ±1.83 / 229.10 ms │     no change │
│ QQuery 5  │     272.92 / 274.33 ±0.94 / 275.40 ms │     271.52 / 275.28 ±3.29 / 280.68 ms │     no change │
│ QQuery 6  │           1.19 / 1.34 ±0.23 / 1.79 ms │           1.24 / 1.41 ±0.24 / 1.88 ms │     no change │
│ QQuery 7  │        13.48 / 13.79 ±0.29 / 14.24 ms │        13.63 / 13.85 ±0.19 / 14.09 ms │     no change │
│ QQuery 8  │     322.67 / 325.22 ±1.91 / 328.01 ms │     321.43 / 325.87 ±3.70 / 332.01 ms │     no change │
│ QQuery 9  │     457.60 / 463.43 ±3.90 / 469.48 ms │     455.09 / 461.73 ±6.00 / 471.62 ms │     no change │
│ QQuery 10 │        69.32 / 70.49 ±1.26 / 72.90 ms │        70.38 / 71.94 ±1.02 / 73.21 ms │     no change │
│ QQuery 11 │        81.52 / 82.22 ±0.58 / 83.27 ms │        81.09 / 82.73 ±1.30 / 84.84 ms │     no change │
│ QQuery 12 │     266.61 / 275.08 ±5.32 / 282.15 ms │     268.04 / 272.41 ±3.43 / 276.52 ms │     no change │
│ QQuery 13 │     370.81 / 376.30 ±7.17 / 390.44 ms │    369.31 / 386.20 ±10.05 / 398.71 ms │     no change │
│ QQuery 14 │     284.74 / 288.99 ±3.80 / 294.43 ms │     282.14 / 286.11 ±3.27 / 290.90 ms │     no change │
│ QQuery 15 │     267.79 / 272.21 ±3.36 / 277.11 ms │     268.16 / 279.24 ±9.27 / 293.85 ms │     no change │
│ QQuery 16 │     617.85 / 628.68 ±6.69 / 636.38 ms │     619.57 / 627.77 ±7.85 / 641.64 ms │     no change │
│ QQuery 17 │     634.67 / 638.51 ±2.94 / 641.59 ms │    614.89 / 634.47 ±14.25 / 658.26 ms │     no change │
│ QQuery 18 │ 1288.35 / 1315.10 ±18.32 / 1343.54 ms │ 1252.48 / 1298.76 ±36.41 / 1340.75 ms │     no change │
│ QQuery 19 │        27.49 / 29.96 ±4.62 / 39.18 ms │       27.74 / 37.43 ±11.80 / 54.75 ms │  1.25x slower │
│ QQuery 20 │     515.41 / 527.96 ±8.27 / 538.25 ms │    518.17 / 535.55 ±17.56 / 566.38 ms │     no change │
│ QQuery 21 │     595.22 / 599.02 ±3.16 / 603.35 ms │     595.18 / 599.69 ±3.28 / 604.31 ms │     no change │
│ QQuery 22 │  1062.26 / 1071.42 ±5.77 / 1079.04 ms │  1071.48 / 1078.60 ±7.81 / 1092.73 ms │     no change │
│ QQuery 23 │ 3202.83 / 3229.02 ±24.81 / 3273.48 ms │ 3209.54 / 3240.20 ±32.53 / 3287.65 ms │     no change │
│ QQuery 24 │        41.56 / 45.82 ±6.89 / 59.53 ms │        41.27 / 44.04 ±3.34 / 50.52 ms │     no change │
│ QQuery 25 │    111.96 / 119.40 ±11.56 / 142.31 ms │    111.06 / 121.38 ±16.15 / 153.23 ms │     no change │
│ QQuery 26 │        41.95 / 43.63 ±2.26 / 48.03 ms │        42.02 / 44.82 ±3.69 / 52.03 ms │     no change │
│ QQuery 27 │     671.54 / 677.86 ±5.23 / 683.82 ms │     670.99 / 678.74 ±6.15 / 687.34 ms │     no change │
│ QQuery 28 │ 3039.44 / 3070.75 ±30.19 / 3112.22 ms │ 3039.37 / 3058.30 ±20.30 / 3096.23 ms │     no change │
│ QQuery 29 │        40.17 / 44.46 ±5.86 / 55.46 ms │       40.15 / 61.27 ±25.98 / 99.91 ms │  1.38x slower │
│ QQuery 30 │    295.89 / 310.12 ±11.15 / 322.86 ms │     298.01 / 305.21 ±5.02 / 312.28 ms │     no change │
│ QQuery 31 │     285.29 / 298.04 ±9.62 / 314.53 ms │    289.96 / 305.04 ±20.97 / 346.61 ms │     no change │
│ QQuery 32 │   950.29 / 984.73 ±22.89 / 1005.85 ms │   941.41 / 989.15 ±29.65 / 1032.07 ms │     no change │
│ QQuery 33 │ 1452.98 / 1496.00 ±43.12 / 1574.57 ms │ 1466.85 / 1484.13 ±17.93 / 1513.86 ms │     no change │
│ QQuery 34 │ 1468.64 / 1535.60 ±54.25 / 1601.85 ms │ 1455.60 / 1482.68 ±22.05 / 1517.88 ms │     no change │
│ QQuery 35 │    273.02 / 300.76 ±28.30 / 354.39 ms │    277.06 / 345.21 ±94.29 / 531.72 ms │  1.15x slower │
│ QQuery 36 │        67.60 / 77.40 ±9.33 / 94.80 ms │        65.53 / 69.51 ±3.17 / 74.97 ms │ +1.11x faster │
│ QQuery 37 │        35.44 / 40.66 ±4.59 / 47.02 ms │        35.41 / 36.64 ±0.85 / 37.94 ms │ +1.11x faster │
│ QQuery 38 │        43.28 / 45.27 ±3.52 / 52.27 ms │        39.76 / 41.05 ±1.25 / 42.84 ms │ +1.10x faster │
│ QQuery 39 │     140.64 / 149.87 ±6.25 / 159.68 ms │    141.40 / 152.89 ±13.79 / 179.54 ms │     no change │
│ QQuery 40 │        14.02 / 16.45 ±4.38 / 25.21 ms │        13.87 / 14.35 ±0.45 / 15.11 ms │ +1.15x faster │
│ QQuery 41 │        13.43 / 15.20 ±2.65 / 20.32 ms │        13.19 / 13.54 ±0.19 / 13.75 ms │ +1.12x faster │
│ QQuery 42 │        12.61 / 12.95 ±0.20 / 13.24 ms │        12.78 / 12.97 ±0.16 / 13.24 ms │     no change │
└───────────┴───────────────────────────────────────┴───────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                                 ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                                 │ 20078.22ms │
│ Total Time (neilc_perf-fd-convert-to-semi-join)   │ 20079.14ms │
│ Average Time (HEAD)                               │   466.94ms │
│ Average Time (neilc_perf-fd-convert-to-semi-join) │   466.96ms │
│ Queries Faster                                    │          5 │
│ Queries Slower                                    │          3 │
│ Queries with No Change                            │         35 │
│ Queries with Failure                              │          0 │
└───────────────────────────────────────────────────┴────────────┘

Resource Usage

clickbench_partitioned — base (merge-base)

Metric Value
Wall time 105.0s
Peak memory 30.5 GiB
Avg memory 22.7 GiB
CPU user 1028.0s
CPU sys 77.2s
Peak spill 0 B

clickbench_partitioned — branch

Metric Value
Wall time 105.0s
Peak memory 29.8 GiB
Avg memory 23.0 GiB
CPU user 1026.2s
CPU sys 77.8s
Peak spill 0 B

File an issue against this benchmark runner

@neilconway
Copy link
Copy Markdown
Contributor Author

@Dandandan I updated the expected plans; everything that changed seemed inline with the intended goal of this PR.

Looking at the latest benchmark numbers, some of the TPC-DS regressions. The plan was q54 still seems to have regressed; I suspect there's another planner/stats bug here, taking a look now.

@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-c4606304557-407-thc6n 6.12.68+ #1 SMP Wed Apr 1 02:23:28 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 neilc/perf-fd-convert-to-semi-join (6b1d38a) to 7843ab3 (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 neilc_perf-fd-convert-to-semi-join
--------------------
Benchmark tpch_sf10.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Query     ┃                               HEAD ┃ neilc_perf-fd-convert-to-semi-join ┃    Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ QQuery 1  │  310.98 / 313.69 ±1.55 / 315.41 ms │  311.57 / 312.35 ±0.46 / 312.96 ms │ no change │
│ QQuery 2  │  102.16 / 105.38 ±3.84 / 112.55 ms │  103.60 / 106.10 ±2.32 / 110.14 ms │ no change │
│ QQuery 3  │  234.23 / 239.22 ±4.72 / 246.31 ms │  232.72 / 237.81 ±3.87 / 242.97 ms │ no change │
│ QQuery 4  │  113.51 / 116.13 ±2.28 / 120.33 ms │  113.67 / 114.87 ±1.45 / 117.59 ms │ no change │
│ QQuery 5  │  351.11 / 354.54 ±2.61 / 358.53 ms │ 347.36 / 359.61 ±10.22 / 377.50 ms │ no change │
│ QQuery 6  │  124.45 / 127.46 ±3.27 / 133.77 ms │  125.20 / 128.04 ±3.02 / 133.61 ms │ no change │
│ QQuery 7  │ 456.75 / 475.97 ±18.69 / 503.29 ms │  454.52 / 468.32 ±8.72 / 479.83 ms │ no change │
│ QQuery 8  │  380.31 / 383.77 ±3.01 / 388.70 ms │  387.84 / 391.52 ±2.56 / 395.85 ms │ no change │
│ QQuery 9  │  542.46 / 548.50 ±6.26 / 560.34 ms │  549.06 / 560.88 ±8.07 / 572.47 ms │ no change │
│ QQuery 10 │ 301.30 / 322.11 ±16.97 / 337.33 ms │ 304.72 / 316.89 ±11.13 / 337.74 ms │ no change │
│ QQuery 11 │    88.31 / 92.69 ±4.82 / 101.90 ms │    89.55 / 96.03 ±5.81 / 103.49 ms │ no change │
│ QQuery 12 │  177.91 / 182.38 ±6.25 / 194.75 ms │  177.54 / 183.67 ±7.14 / 196.82 ms │ no change │
│ QQuery 13 │  289.59 / 292.18 ±3.64 / 299.34 ms │  284.34 / 299.16 ±9.41 / 309.87 ms │ no change │
│ QQuery 14 │  172.10 / 176.31 ±3.96 / 183.49 ms │  172.71 / 177.00 ±4.67 / 185.57 ms │ no change │
│ QQuery 15 │  306.85 / 309.60 ±2.48 / 313.35 ms │  305.92 / 308.72 ±2.32 / 312.63 ms │ no change │
│ QQuery 16 │     67.30 / 70.31 ±2.72 / 74.41 ms │     64.85 / 67.54 ±2.53 / 71.86 ms │ no change │
│ QQuery 17 │  624.96 / 636.13 ±8.52 / 648.14 ms │  619.51 / 629.01 ±8.78 / 640.43 ms │ no change │
│ QQuery 18 │ 669.29 / 699.39 ±19.52 / 724.06 ms │ 675.79 / 694.21 ±13.78 / 717.67 ms │ no change │
│ QQuery 19 │ 251.66 / 273.43 ±20.95 / 299.67 ms │ 245.50 / 268.71 ±25.09 / 309.43 ms │ no change │
│ QQuery 20 │ 281.12 / 290.20 ±11.02 / 311.85 ms │ 278.04 / 292.16 ±11.59 / 309.77 ms │ no change │
│ QQuery 21 │ 647.99 / 661.36 ±13.68 / 685.44 ms │ 675.76 / 686.40 ±16.07 / 717.87 ms │ no change │
│ QQuery 22 │     59.87 / 61.86 ±1.87 / 64.77 ms │     59.16 / 61.31 ±1.43 / 62.59 ms │ no change │
└───────────┴────────────────────────────────────┴────────────────────────────────────┴───────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Benchmark Summary                                 ┃           ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ Total Time (HEAD)                                 │ 6732.60ms │
│ Total Time (neilc_perf-fd-convert-to-semi-join)   │ 6760.31ms │
│ Average Time (HEAD)                               │  306.03ms │
│ Average Time (neilc_perf-fd-convert-to-semi-join) │  307.29ms │
│ Queries Faster                                    │         0 │
│ Queries Slower                                    │         0 │
│ Queries with No Change                            │        22 │
│ Queries with Failure                              │         0 │
└───────────────────────────────────────────────────┴───────────┘

Resource Usage

tpch10 — base (merge-base)

Metric Value
Wall time 35.0s
Peak memory 12.0 GiB
Avg memory 8.5 GiB
CPU user 351.8s
CPU sys 20.0s
Peak spill 0 B

tpch10 — branch

Metric Value
Wall time 35.0s
Peak memory 12.0 GiB
Avg memory 8.5 GiB
CPU user 352.3s
CPU sys 20.1s
Peak spill 0 B

File an issue against this benchmark runner

@Dandandan
Copy link
Copy Markdown
Contributor

Dandandan commented Jun 2, 2026

The plans are looking better, although I think we probably need to have some more specialization (semi join? / single key column? etc.) to benefit from it more?

@alamb
Copy link
Copy Markdown
Contributor

alamb commented Jun 5, 2026

As I understand it, the idea of this optimization is to use semi-join which in theory should be more efficient than a normal INNER JOIN. However, it seems the DataFusion semi-join doesn't actually have a noticably faster implementation?

If so it seems reasonable to me to merge this PR and maybe file a ticket to improve SEMI join performance

@neilconway
Copy link
Copy Markdown
Contributor Author

neilconway commented Jun 5, 2026

@alamb There are two scenarios where this should be a win:

  1. Replacing an inner join with a left semi-join, where the inner join would have produced at most one matching row for each left tuple. Exactly the same intermediate result sets, but should be slightly faster due to less join overhead etc (plus it lets the planner place tighter bounds on the size of the join output set). I haven't done detailed microbenchmarks yet, but you're right that it seems we aren't seeing major wins from this and it might merit further investigation.
  2. Replacing an inner join with a left semi-join, where each left tuple can match multiple right tuples, but then those duplicates are ignored/filtered out by an upstream operator (e.g., DISTINCT). In this scenario, this optimization could be a major performance win, depending on the number of duplicates produced of course.

(Symmetric for right semi joins as well, of course.)

I can't see a scenario where this PR would regress performance.

There were some semi-join planner/stats bugs that resulted in picking worse plans; #22762 fixes the last one that I know about. Once that lands I'll rerun the benchmarks for this PR.

@Dandandan
Copy link
Copy Markdown
Contributor

Replacing an inner join with a left semi-join, where the inner join would have produced at most one matching row for each left tuple. Exactly the same intermediate result sets, but should be slightly faster due to less join overhead etc (plus it lets the planner place tighter bounds on the size of the join output set). I haven't done detailed microbenchmarks yet, but you're right that it seems we aren't seeing major wins from this and it might merit further investigation.

I think in this situation there is only limited difference currently, it will use most of the same code paths. There is probably some further specialization we can do for different join types.

@alamb
Copy link
Copy Markdown
Contributor

alamb commented Jun 5, 2026

run benchmark sql_planner

@adriangbot
Copy link
Copy Markdown

🤖 Criterion benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c4634950104-455-fqgzh 6.12.68+ #1 SMP Wed Apr 1 02:23:28 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 neilc/perf-fd-convert-to-semi-join (6b1d38a) to 7843ab3 (merge-base) diff
BENCH_NAME=sql_planner
BENCH_COMMAND=cargo bench --features=parquet --bench sql_planner
BENCH_FILTER=
Results will be posted here when complete


File an issue against this benchmark runner

Copy link
Copy Markdown
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

I went through this one carefully, and reviewed the plan changes and code coverage. Looks like a good improvement to me. Thank you @neilconway and @Dandandan

I think there is one good other than a few more tests

Thanks again


//! [`EliminateJoin`] rewrites `INNER JOIN` with `true`/`null`
use crate::optimizer::ApplyOrder;
//! [`EliminateJoin`] rewrites inner joins to simpler forms to make them cheaper
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.

I always enjoy reading PRs where you learn something from the comments ❤️ 🤓


/// The columns that are "live" at a plan node, i.e., which of its output
/// columns are referenced by an ancestor node. Represented as a set of column
/// indices, relative to the node's schema.
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.

it might be useful to refer back to the module level comments that explain this structure in more detail

//! only L's columns. The rewrite to `L ⋉ R` is valid when both of the
//! following are true:
//!
//! 1. None of R's columns are referenced above the join.
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.

👍

Comment on lines +80 to +83
/// The columns that are "live" at a plan node, i.e., which of its output
/// columns are referenced by an ancestor node. Represented as a set of column
/// indices, relative to the node's schema.
type LiveColumns = HashSet<usize>;
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.

You could potentially use arrow BooleanBufferBuilder as a mutable bitset: https://docs.rs/arrow/latest/arrow/array/struct.BooleanBufferBuilder.html

Not sure if that is actually faster or not

live: LiveColumns,
duplicate_insensitive: bool,
) -> Result<Transformed<LogicalPlan>> {
match plan {
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.

I think this code depends on being able to walk all expressions used in the plan to remain correct. I worry if we ever modify a LogicalPlan node to add a new Expr container -- this code would continue to compile, and we would probably end up with subtle bugs

SOme ideas on how to address:

  1. Use this API for visiting expressions/finding live columns: https://docs.rs/datafusion/latest/datafusion/logical_expr/enum.LogicalPlan.html#method.apply_expressions
  2. name all fields (remove ..) so that if any field is added, the PR must also explicitly change this file too

(left, right)
}

fn side_unique_on_join<'a>(
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.

Woudl this be better / easier to discover / reuse as a method on Join?

}

/// The columns of `schema` referenced by any of `exprs`.
fn live_columns<'a>(
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.

Could be LoveColumns::try_new() potentially, rather than a free function


/// Inserts into `live` the index, within `schema`, of every column referenced
/// by any of `exprs`.
fn extend_live_columns<'a>(
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.

Another good candidate for a LIveColumns method perhaps

01)Sort: supplier.s_acctbal DESC NULLS FIRST, nation.n_name ASC NULLS LAST, supplier.s_name ASC NULLS LAST, part.p_partkey ASC NULLS LAST, fetch=10
02)--Projection: supplier.s_acctbal, supplier.s_name, nation.n_name, part.p_partkey, part.p_mfgr, supplier.s_address, supplier.s_phone, supplier.s_comment
03)----Inner Join: part.p_partkey = __scalar_sq_1.ps_partkey, partsupp.ps_supplycost = __scalar_sq_1.min(partsupp.ps_supplycost)
03)----LeftSemi Join: part.p_partkey = __scalar_sq_1.ps_partkey, partsupp.ps_supplycost = __scalar_sq_1.min(partsupp.ps_supplycost)
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.

for anyone else reviewing this, TPCH has FK:PK joins on its schema, so this transformation can potentially help here

},
)
}
LogicalPlan::Distinct(Distinct::All(input)) => {
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.

I think some of this code is not covered by tests

cargo llvm-cov --html  test --profile=ci -p datafusion-optimizer
cargo llvm-cov --html  test --profile=ci --test sqllogictests
Image

@adriangbot
Copy link
Copy Markdown

🤖 Criterion 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

group                                                 main                                   neilc_perf-fd-convert-to-semi-join
-----                                                 ----                                   ----------------------------------
logical_aggregate_with_join                           1.00    455.3±1.34µs        ? ?/sec    1.01    458.3±1.93µs        ? ?/sec
logical_correlated_subquery_exists                    1.00    286.6±0.92µs        ? ?/sec    1.01    288.3±5.83µs        ? ?/sec
logical_correlated_subquery_in                        1.01    288.8±5.76µs        ? ?/sec    1.00    284.7±1.03µs        ? ?/sec
logical_distinct_many_columns                         1.00    572.0±1.88µs        ? ?/sec    1.00    574.6±1.23µs        ? ?/sec
logical_join_4_with_agg_and_filter                    1.01    257.1±2.29µs        ? ?/sec    1.00    253.5±1.52µs        ? ?/sec
logical_join_8_with_agg_sort_limit                    1.00    428.2±0.97µs        ? ?/sec    1.00    427.0±2.87µs        ? ?/sec
logical_join_chain_16                                 1.00    682.3±2.48µs        ? ?/sec    1.00    682.9±2.89µs        ? ?/sec
logical_join_chain_4                                  1.00    121.8±0.48µs        ? ?/sec    1.00    121.7±0.44µs        ? ?/sec
logical_join_chain_8                                  1.00    252.6±0.73µs        ? ?/sec    1.00    251.6±1.29µs        ? ?/sec
logical_multiple_subqueries                           1.00    523.1±5.90µs        ? ?/sec    1.00    523.8±5.86µs        ? ?/sec
logical_nested_cte_4_levels                           1.00    268.9±1.26µs        ? ?/sec    1.03    276.7±1.15µs        ? ?/sec
logical_plan_struct_join_agg_sort                     1.01    182.2±0.96µs        ? ?/sec    1.00    180.9±0.58µs        ? ?/sec
logical_plan_tpcds_all                                1.00     93.0±0.14ms        ? ?/sec    1.01     93.6±0.14ms        ? ?/sec
logical_plan_tpch_all                                 1.00      6.5±0.01ms        ? ?/sec    1.02      6.6±0.01ms        ? ?/sec
logical_scalar_subquery                               1.00    309.0±0.89µs        ? ?/sec    1.00    310.4±1.30µs        ? ?/sec
logical_select_all_from_1000                          1.00    104.4±0.40ms        ? ?/sec    1.00    104.4±0.23ms        ? ?/sec
logical_select_one_from_700                           1.00    325.4±2.37µs        ? ?/sec    1.00    324.2±2.00µs        ? ?/sec
logical_trivial_join_high_numbered_columns            1.01    289.1±1.54µs        ? ?/sec    1.00    286.8±1.53µs        ? ?/sec
logical_trivial_join_low_numbered_columns             1.00    272.9±1.27µs        ? ?/sec    1.02    277.2±1.95µs        ? ?/sec
logical_union_4_branches                              1.00    426.3±1.86µs        ? ?/sec    1.00    426.1±1.93µs        ? ?/sec
logical_union_8_branches                              1.00    813.2±3.33µs        ? ?/sec    1.01    817.3±2.84µs        ? ?/sec
logical_wide_aggregate_100_exprs                      1.00      4.3±0.01ms        ? ?/sec    1.00      4.3±0.02ms        ? ?/sec
logical_wide_case_50_exprs                            1.00      2.4±0.01ms        ? ?/sec    1.00      2.4±0.01ms        ? ?/sec
logical_wide_filter_200_predicates                    1.00   1315.0±7.00µs        ? ?/sec    1.00   1313.8±7.01µs        ? ?/sec
logical_wide_filter_50_predicates                     1.00    396.3±2.00µs        ? ?/sec    1.00    394.8±1.99µs        ? ?/sec
optimizer_correlated_exists                           1.00    253.1±0.98µs        ? ?/sec    1.02    257.1±1.70µs        ? ?/sec
optimizer_join_4_with_agg_filter                      1.00    436.9±1.33µs        ? ?/sec    1.02    447.1±2.16µs        ? ?/sec
optimizer_join_chain_4                                1.00    177.8±0.38µs        ? ?/sec    1.02    181.8±0.23µs        ? ?/sec
optimizer_join_chain_8                                1.00    557.1±1.13µs        ? ?/sec    1.02    567.3±0.84µs        ? ?/sec
optimizer_select_all_from_1000                        1.00      4.6±0.01ms        ? ?/sec    1.50      6.9±0.01ms        ? ?/sec
optimizer_select_one_from_700                         1.00    256.1±0.59µs        ? ?/sec    1.00    256.1±0.77µs        ? ?/sec
optimizer_tpcds_all                                   1.00    291.1±0.29ms        ? ?/sec    1.07    311.9±0.41ms        ? ?/sec
optimizer_tpch_all                                    1.00     15.2±0.03ms        ? ?/sec    1.13     17.2±0.04ms        ? ?/sec
optimizer_wide_aggregate_100                          1.00      2.1±0.00ms        ? ?/sec    1.03      2.1±0.00ms        ? ?/sec
optimizer_wide_filter_200                             1.00      3.5±0.01ms        ? ?/sec    1.06      3.7±0.01ms        ? ?/sec
physical_intersection                                 1.00    586.5±1.52µs        ? ?/sec    1.01    594.9±1.45µs        ? ?/sec
physical_join_consider_sort                           1.00   1028.8±6.01µs        ? ?/sec    1.00   1027.9±2.17µs        ? ?/sec
physical_join_distinct                                1.00    267.7±1.21µs        ? ?/sec    1.00    268.4±1.34µs        ? ?/sec
physical_many_self_joins                              1.00      7.7±0.01ms        ? ?/sec    1.04      8.0±0.01ms        ? ?/sec
physical_plan_clickbench_all                          1.00    122.9±0.29ms        ? ?/sec    1.03    126.8±0.29ms        ? ?/sec
physical_plan_clickbench_q1                           1.00   1289.0±5.87µs        ? ?/sec    1.06   1363.5±7.20µs        ? ?/sec
physical_plan_clickbench_q10                          1.00   1917.8±6.41µs        ? ?/sec    1.04   1992.3±5.48µs        ? ?/sec
physical_plan_clickbench_q11                          1.00      2.1±0.01ms        ? ?/sec    1.04      2.2±0.01ms        ? ?/sec
physical_plan_clickbench_q12                          1.00      2.1±0.00ms        ? ?/sec    1.04      2.2±0.01ms        ? ?/sec
physical_plan_clickbench_q13                          1.00   1921.6±6.12µs        ? ?/sec    1.04   1991.5±5.61µs        ? ?/sec
physical_plan_clickbench_q14                          1.00      2.1±0.01ms        ? ?/sec    1.02      2.1±0.01ms        ? ?/sec
physical_plan_clickbench_q15                          1.00      2.0±0.01ms        ? ?/sec    1.02      2.0±0.01ms        ? ?/sec
physical_plan_clickbench_q16                          1.00   1691.0±5.13µs        ? ?/sec    1.03   1743.3±5.49µs        ? ?/sec
physical_plan_clickbench_q17                          1.00   1734.5±5.03µs        ? ?/sec    1.03   1788.1±6.47µs        ? ?/sec
physical_plan_clickbench_q18                          1.00   1600.1±5.53µs        ? ?/sec    1.03   1642.6±5.86µs        ? ?/sec
physical_plan_clickbench_q19                          1.00   1967.6±5.15µs        ? ?/sec    1.03      2.0±0.01ms        ? ?/sec
physical_plan_clickbench_q2                           1.00   1717.7±5.99µs        ? ?/sec    1.04   1779.1±5.74µs        ? ?/sec
physical_plan_clickbench_q20                          1.00   1506.4±5.24µs        ? ?/sec    1.03   1557.1±6.35µs        ? ?/sec
physical_plan_clickbench_q21                          1.00   1733.7±6.12µs        ? ?/sec    1.03   1788.1±4.35µs        ? ?/sec
physical_plan_clickbench_q22                          1.00      2.1±0.00ms        ? ?/sec    1.04      2.2±0.01ms        ? ?/sec
physical_plan_clickbench_q23                          1.00      2.3±0.01ms        ? ?/sec    1.02      2.3±0.01ms        ? ?/sec
physical_plan_clickbench_q24                          1.00      6.6±0.01ms        ? ?/sec    1.02      6.8±0.01ms        ? ?/sec
physical_plan_clickbench_q25                          1.00   1838.2±6.87µs        ? ?/sec    1.03   1890.8±5.26µs        ? ?/sec
physical_plan_clickbench_q26                          1.00   1672.8±5.73µs        ? ?/sec    1.03   1725.3±5.73µs        ? ?/sec
physical_plan_clickbench_q27                          1.00   1853.9±7.12µs        ? ?/sec    1.03   1910.8±6.14µs        ? ?/sec
physical_plan_clickbench_q28                          1.00      2.3±0.01ms        ? ?/sec    1.03      2.3±0.01ms        ? ?/sec
physical_plan_clickbench_q29                          1.00      2.4±0.01ms        ? ?/sec    1.03      2.5±0.01ms        ? ?/sec
physical_plan_clickbench_q3                           1.00   1597.3±3.98µs        ? ?/sec    1.03   1648.3±7.82µs        ? ?/sec
physical_plan_clickbench_q30                          1.00     15.0±0.04ms        ? ?/sec    1.01     15.1±0.03ms        ? ?/sec
physical_plan_clickbench_q31                          1.00      2.3±0.01ms        ? ?/sec    1.04      2.4±0.01ms        ? ?/sec
physical_plan_clickbench_q32                          1.00      2.3±0.01ms        ? ?/sec    1.03      2.4±0.01ms        ? ?/sec
physical_plan_clickbench_q33                          1.00  1946.4±16.16µs        ? ?/sec    1.02   1986.3±6.01µs        ? ?/sec
physical_plan_clickbench_q34                          1.00   1696.8±5.73µs        ? ?/sec    1.03   1753.4±5.82µs        ? ?/sec
physical_plan_clickbench_q35                          1.00   1776.8±5.35µs        ? ?/sec    1.02   1812.1±6.10µs        ? ?/sec
physical_plan_clickbench_q36                          1.00      2.1±0.00ms        ? ?/sec    1.02      2.1±0.01ms        ? ?/sec
physical_plan_clickbench_q37                          1.00      2.4±0.01ms        ? ?/sec    1.02      2.5±0.01ms        ? ?/sec
physical_plan_clickbench_q38                          1.00      2.4±0.01ms        ? ?/sec    1.02      2.5±0.01ms        ? ?/sec
physical_plan_clickbench_q39                          1.00      2.5±0.01ms        ? ?/sec    1.02      2.5±0.01ms        ? ?/sec
physical_plan_clickbench_q4                           1.00   1413.1±4.67µs        ? ?/sec    1.05  1480.7±10.45µs        ? ?/sec
physical_plan_clickbench_q40                          1.00      3.2±0.01ms        ? ?/sec    1.03      3.3±0.01ms        ? ?/sec
physical_plan_clickbench_q41                          1.00      2.7±0.01ms        ? ?/sec    1.04      2.8±0.01ms        ? ?/sec
physical_plan_clickbench_q42                          1.00      2.9±0.01ms        ? ?/sec    1.04      3.0±0.01ms        ? ?/sec
physical_plan_clickbench_q43                          1.00      3.0±0.01ms        ? ?/sec    1.04      3.1±0.01ms        ? ?/sec
physical_plan_clickbench_q44                          1.00   1473.7±6.05µs        ? ?/sec    1.05   1543.2±5.35µs        ? ?/sec
physical_plan_clickbench_q45                          1.00   1520.3±6.22µs        ? ?/sec    1.02   1548.7±4.45µs        ? ?/sec
physical_plan_clickbench_q46                          1.00   1788.6±6.09µs        ? ?/sec    1.04   1851.3±7.12µs        ? ?/sec
physical_plan_clickbench_q47                          1.00      2.5±0.01ms        ? ?/sec    1.02      2.6±0.01ms        ? ?/sec
physical_plan_clickbench_q48                          1.00      2.7±0.00ms        ? ?/sec    1.02      2.8±0.01ms        ? ?/sec
physical_plan_clickbench_q49                          1.00      2.7±0.00ms        ? ?/sec    1.02      2.8±0.01ms        ? ?/sec
physical_plan_clickbench_q5                           1.00   1539.8±6.00µs        ? ?/sec    1.03   1591.9±5.56µs        ? ?/sec
physical_plan_clickbench_q50                          1.00      2.6±0.01ms        ? ?/sec    1.03      2.6±0.01ms        ? ?/sec
physical_plan_clickbench_q51                          1.00   1879.0±5.61µs        ? ?/sec    1.03   1938.0±6.52µs        ? ?/sec
physical_plan_clickbench_q6                           1.00   1526.6±4.76µs        ? ?/sec    1.05   1598.3±6.05µs        ? ?/sec
physical_plan_clickbench_q7                           1.00   1342.3±5.64µs        ? ?/sec    1.06   1417.5±5.75µs        ? ?/sec
physical_plan_clickbench_q8                           1.00   1828.3±5.86µs        ? ?/sec    1.04   1902.7±4.96µs        ? ?/sec
physical_plan_clickbench_q9                           1.00   1798.9±5.53µs        ? ?/sec    1.04   1877.4±5.86µs        ? ?/sec
physical_plan_struct_join_agg_sort                    1.00   1282.9±2.72µs        ? ?/sec    1.01   1291.5±2.16µs        ? ?/sec
physical_plan_tpcds_all                               1.00    719.1±0.56ms        ? ?/sec    1.00    716.3±0.87ms        ? ?/sec
physical_plan_tpch_all                                1.00     44.7±0.05ms        ? ?/sec    1.01     45.1±0.08ms        ? ?/sec
physical_plan_tpch_q1                                 1.00   1482.5±3.74µs        ? ?/sec    1.01   1493.7±2.87µs        ? ?/sec
physical_plan_tpch_q10                                1.00      2.9±0.00ms        ? ?/sec    1.02      3.0±0.01ms        ? ?/sec
physical_plan_tpch_q11                                1.00      2.2±0.00ms        ? ?/sec    1.04      2.3±0.01ms        ? ?/sec
physical_plan_tpch_q12                                1.00   1212.8±2.56µs        ? ?/sec    1.01   1229.4±3.52µs        ? ?/sec
physical_plan_tpch_q13                                1.00   1004.8±2.53µs        ? ?/sec    1.02   1021.1±2.28µs        ? ?/sec
physical_plan_tpch_q14                                1.00   1379.2±3.41µs        ? ?/sec    1.02   1405.8±2.67µs        ? ?/sec
physical_plan_tpch_q16                                1.00   1535.2±1.86µs        ? ?/sec    1.02   1560.8±2.96µs        ? ?/sec
physical_plan_tpch_q17                                1.00   1716.4±6.17µs        ? ?/sec    1.00   1716.7±2.45µs        ? ?/sec
physical_plan_tpch_q18                                1.00   1974.5±2.25µs        ? ?/sec    1.02      2.0±0.00ms        ? ?/sec
physical_plan_tpch_q19                                1.00   1646.1±3.26µs        ? ?/sec    1.12   1836.2±2.55µs        ? ?/sec
physical_plan_tpch_q2                                 1.06      4.1±0.01ms        ? ?/sec    1.00      3.8±0.00ms        ? ?/sec
physical_plan_tpch_q20                                1.04      2.2±0.00ms        ? ?/sec    1.00      2.1±0.00ms        ? ?/sec
physical_plan_tpch_q21                                1.10      3.0±0.00ms        ? ?/sec    1.00      2.7±0.00ms        ? ?/sec
physical_plan_tpch_q22                                1.00   1538.1±2.82µs        ? ?/sec    1.02   1561.8±2.79µs        ? ?/sec
physical_plan_tpch_q3                                 1.06   1898.1±3.16µs        ? ?/sec    1.00   1797.4±4.19µs        ? ?/sec
physical_plan_tpch_q4                                 1.00   1198.5±1.99µs        ? ?/sec    1.00   1200.0±2.13µs        ? ?/sec
physical_plan_tpch_q5                                 1.00      2.7±0.00ms        ? ?/sec    1.07      2.8±0.01ms        ? ?/sec
physical_plan_tpch_q6                                 1.02    631.4±5.10µs        ? ?/sec    1.00    619.1±1.54µs        ? ?/sec
physical_plan_tpch_q7                                 1.01      3.0±0.02ms        ? ?/sec    1.00      3.0±0.00ms        ? ?/sec
physical_plan_tpch_q8                                 1.00      4.0±0.01ms        ? ?/sec    1.00      4.0±0.00ms        ? ?/sec
physical_plan_tpch_q9                                 1.00      2.8±0.00ms        ? ?/sec    1.04      2.9±0.00ms        ? ?/sec
physical_select_aggregates_from_200                   1.00     15.4±0.02ms        ? ?/sec    1.02     15.6±0.02ms        ? ?/sec
physical_select_all_from_1000                         1.00    113.3±0.33ms        ? ?/sec    1.02    115.9±0.64ms        ? ?/sec
physical_select_one_from_700                          1.00    767.3±2.62µs        ? ?/sec    1.00    770.5±2.57µs        ? ?/sec
physical_sorted_union_order_by_10_int64               1.00      4.3±0.01ms        ? ?/sec    1.00      4.4±0.00ms        ? ?/sec
physical_sorted_union_order_by_10_uint64              1.00      8.4±0.03ms        ? ?/sec    1.01      8.5±0.01ms        ? ?/sec
physical_sorted_union_order_by_50_int64               1.00    107.4±0.31ms        ? ?/sec    1.00    107.4±0.27ms        ? ?/sec
physical_sorted_union_order_by_50_uint64              1.00    358.1±3.98ms        ? ?/sec    1.01    362.9±0.99ms        ? ?/sec
physical_theta_join_consider_sort                     1.01   1057.1±6.53µs        ? ?/sec    1.00   1051.6±2.42µs        ? ?/sec
physical_unnest_to_join                               1.00    659.7±1.83µs        ? ?/sec    1.01    663.8±2.14µs        ? ?/sec
physical_window_function_partition_by_12_on_values    1.01    731.5±2.06µs        ? ?/sec    1.00    721.2±1.59µs        ? ?/sec
physical_window_function_partition_by_30_on_values    1.01   1456.8±3.20µs        ? ?/sec    1.00   1442.5±2.44µs        ? ?/sec
physical_window_function_partition_by_4_on_values     1.01    441.2±4.63µs        ? ?/sec    1.00    434.8±0.76µs        ? ?/sec
physical_window_function_partition_by_7_on_values     1.01    544.0±3.10µs        ? ?/sec    1.00    539.1±2.09µs        ? ?/sec
physical_window_function_partition_by_8_on_values     1.01    584.5±3.74µs        ? ?/sec    1.00    577.7±1.18µs        ? ?/sec
with_param_values_many_columns                        1.00    430.1±2.11µs        ? ?/sec    1.00    431.3±1.92µs        ? ?/sec

Resource Usage

base (merge-base)

Metric Value
Wall time 1565.3s
Peak memory 19.5 GiB
Avg memory 19.5 GiB
CPU user 1880.9s
CPU sys 1.9s
Peak spill 0 B

branch

Metric Value
Wall time 1565.3s
Peak memory 19.6 GiB
Avg memory 19.5 GiB
CPU user 1880.4s
CPU sys 1.6s
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

optimizer Optimizer rules sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Optimize inner joins to semi joins when possible

4 participants