Skip to content

Optimize group by with limit#22009

Draft
Dandandan wants to merge 5 commits intoapache:mainfrom
Dandandan:optimize-clickbench-q17-limit
Draft

Optimize group by with limit#22009
Dandandan wants to merge 5 commits intoapache:mainfrom
Dandandan:optimize-clickbench-q17-limit

Conversation

@Dandandan
Copy link
Copy Markdown
Contributor

@Dandandan Dandandan commented May 4, 2026

Which issue does this PR close?

  • Closes #.

Rationale for this change

ClickBench q17 aggregates by UserID, SearchPhrase and applies a small LIMIT. Building the full aggregate state can use substantially more memory than needed for queries where any limited set of grouping keys is sufficient.

This PR preselects a limited set of grouping keys before running the original aggregate, allowing existing join dynamic filtering to push that key set into the second input scan.

What changes are included in this PR?

  • Extends PushDownLimit to rewrite limited grouped aggregates with aggregate expressions when enable_distinct_aggregation_soft_limit is enabled.
  • Builds LIMIT K (GROUP BY keys) as a key preselection plan, then right-semi joins the original input against those keys before the final aggregate.

Are these changes tested?

Yes, existing tests

Are there any user-facing changes?

No API changes.

@github-actions github-actions Bot added optimizer Optimizer rules core Core DataFusion crate sqllogictest SQL Logic Tests (.slt) physical-plan Changes to the physical-plan crate labels May 4, 2026
@Dandandan
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-c4370505314-2001-kh7nw 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 optimize-clickbench-q17-limit (dbd05b5) to 948cd09 (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-c4370505314-2002-spd8k 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 optimize-clickbench-q17-limit (dbd05b5) to 948cd09 (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-c4370505314-2003-ggwxn 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 optimize-clickbench-q17-limit (dbd05b5) to 948cd09 (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 optimize-clickbench-q17-limit
--------------------
Benchmark tpch_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┓
┃ Query     ┃                           HEAD ┃  optimize-clickbench-q17-limit ┃       Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━┩
│ QQuery 1  │ 40.35 / 41.02 ±0.91 / 42.81 ms │ 39.83 / 40.59 ±1.19 / 42.97 ms │    no change │
│ QQuery 2  │ 21.16 / 21.40 ±0.24 / 21.83 ms │ 21.09 / 21.63 ±0.58 / 22.70 ms │    no change │
│ QQuery 3  │ 36.47 / 38.84 ±1.89 / 40.85 ms │ 36.93 / 38.97 ±1.41 / 40.41 ms │    no change │
│ QQuery 4  │ 19.36 / 19.52 ±0.14 / 19.75 ms │ 18.12 / 18.85 ±0.70 / 20.18 ms │    no change │
│ QQuery 5  │ 46.08 / 49.14 ±2.51 / 52.95 ms │ 46.27 / 46.88 ±0.50 / 47.75 ms │    no change │
│ QQuery 6  │ 17.28 / 17.45 ±0.15 / 17.73 ms │ 17.27 / 17.37 ±0.13 / 17.61 ms │    no change │
│ QQuery 7  │ 50.34 / 52.09 ±1.69 / 55.01 ms │ 49.14 / 50.88 ±1.39 / 52.86 ms │    no change │
│ QQuery 8  │ 47.26 / 47.61 ±0.33 / 48.22 ms │ 46.96 / 47.84 ±0.70 / 48.84 ms │    no change │
│ QQuery 9  │ 54.62 / 55.50 ±0.82 / 56.71 ms │ 53.88 / 55.22 ±0.96 / 56.67 ms │    no change │
│ QQuery 10 │ 65.98 / 67.04 ±1.09 / 68.48 ms │ 67.94 / 68.70 ±0.80 / 69.84 ms │    no change │
│ QQuery 11 │ 14.15 / 14.32 ±0.16 / 14.52 ms │ 15.01 / 15.38 ±0.37 / 16.09 ms │ 1.07x slower │
│ QQuery 12 │ 26.40 / 26.76 ±0.24 / 27.04 ms │ 27.26 / 27.55 ±0.17 / 27.77 ms │    no change │
│ QQuery 13 │ 36.30 / 36.53 ±0.31 / 37.12 ms │ 37.53 / 38.37 ±0.57 / 39.19 ms │ 1.05x slower │
│ QQuery 14 │ 27.53 / 28.00 ±0.48 / 28.86 ms │ 28.09 / 28.42 ±0.51 / 29.44 ms │    no change │
│ QQuery 15 │ 34.40 / 35.03 ±0.71 / 36.37 ms │ 34.97 / 36.23 ±0.79 / 37.26 ms │    no change │
│ QQuery 16 │ 16.06 / 16.19 ±0.07 / 16.25 ms │ 15.99 / 16.22 ±0.13 / 16.36 ms │    no change │
│ QQuery 17 │ 81.98 / 83.27 ±1.46 / 86.08 ms │ 85.19 / 86.01 ±0.56 / 86.82 ms │    no change │
│ QQuery 18 │ 73.06 / 74.12 ±0.59 / 74.65 ms │ 68.95 / 72.48 ±2.85 / 75.07 ms │    no change │
│ QQuery 19 │ 39.42 / 39.78 ±0.52 / 40.81 ms │ 37.45 / 38.35 ±1.52 / 41.38 ms │    no change │
│ QQuery 20 │ 40.41 / 40.95 ±0.79 / 42.51 ms │ 39.78 / 42.00 ±1.51 / 44.51 ms │    no change │
│ QQuery 21 │ 61.86 / 63.26 ±1.39 / 65.77 ms │ 58.76 / 60.83 ±1.48 / 62.91 ms │    no change │
│ QQuery 22 │ 24.11 / 24.31 ±0.17 / 24.56 ms │ 24.07 / 24.35 ±0.20 / 24.58 ms │    no change │
└───────────┴────────────────────────────────┴────────────────────────────────┴──────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┓
┃ Benchmark Summary                            ┃          ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━┩
│ Total Time (HEAD)                            │ 892.13ms │
│ Total Time (optimize-clickbench-q17-limit)   │ 893.12ms │
│ Average Time (HEAD)                          │  40.55ms │
│ Average Time (optimize-clickbench-q17-limit) │  40.60ms │
│ Queries Faster                               │        0 │
│ Queries Slower                               │        2 │
│ Queries with No Change                       │       20 │
│ Queries with Failure                         │        0 │
└──────────────────────────────────────────────┴──────────┘

Resource Usage

tpch — base (merge-base)

Metric Value
Wall time 5.0s
Peak memory 5.8 GiB
Avg memory 5.1 GiB
CPU user 33.4s
CPU sys 2.3s
Peak spill 0 B

tpch — branch

Metric Value
Wall time 5.0s
Peak memory 5.5 GiB
Avg memory 5.0 GiB
CPU user 33.3s
CPU sys 2.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 optimize-clickbench-q17-limit
--------------------
Benchmark tpcds_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┓
┃ Query     ┃                                     HEAD ┃            optimize-clickbench-q17-limit ┃       Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━┩
│ QQuery 1  │              7.06 / 7.64 ±0.85 / 9.33 ms │              6.85 / 7.33 ±0.85 / 9.02 ms │    no change │
│ QQuery 2  │        145.20 / 145.59 ±0.34 / 146.16 ms │        144.28 / 144.50 ±0.13 / 144.65 ms │    no change │
│ QQuery 3  │        114.06 / 115.24 ±1.19 / 117.48 ms │        112.97 / 113.49 ±0.35 / 114.04 ms │    no change │
│ QQuery 4  │    1279.72 / 1301.61 ±11.44 / 1311.45 ms │     1282.04 / 1293.35 ±6.77 / 1300.06 ms │    no change │
│ QQuery 5  │        173.43 / 175.11 ±2.21 / 179.49 ms │        173.31 / 174.02 ±0.60 / 174.89 ms │    no change │
│ QQuery 6  │        133.81 / 138.85 ±3.99 / 145.92 ms │        136.43 / 140.70 ±2.44 / 143.45 ms │    no change │
│ QQuery 7  │        319.35 / 322.49 ±2.06 / 325.59 ms │        318.90 / 320.70 ±1.72 / 323.87 ms │    no change │
│ QQuery 8  │        113.27 / 113.70 ±0.52 / 114.65 ms │        112.31 / 113.54 ±1.06 / 115.51 ms │    no change │
│ QQuery 9  │         96.16 / 100.72 ±2.39 / 103.18 ms │          95.73 / 99.44 ±2.62 / 103.25 ms │    no change │
│ QQuery 10 │        103.30 / 103.60 ±0.35 / 104.05 ms │        102.59 / 102.88 ±0.31 / 103.36 ms │    no change │
│ QQuery 11 │        877.64 / 889.43 ±9.89 / 903.99 ms │        881.29 / 892.41 ±5.87 / 898.80 ms │    no change │
│ QQuery 12 │           44.18 / 44.48 ±0.23 / 44.84 ms │           43.85 / 44.40 ±0.73 / 45.82 ms │    no change │
│ QQuery 13 │        391.10 / 393.61 ±2.28 / 397.78 ms │        385.91 / 389.05 ±2.56 / 391.59 ms │    no change │
│ QQuery 14 │     1032.88 / 1035.19 ±2.08 / 1038.26 ms │     1033.93 / 1037.22 ±3.24 / 1042.90 ms │    no change │
│ QQuery 15 │           14.59 / 14.98 ±0.40 / 15.74 ms │           14.64 / 15.06 ±0.23 / 15.34 ms │    no change │
│ QQuery 16 │              7.54 / 7.72 ±0.17 / 8.02 ms │              7.46 / 7.58 ±0.20 / 7.98 ms │    no change │
│ QQuery 17 │        203.57 / 205.23 ±1.90 / 208.65 ms │        202.24 / 204.57 ±1.54 / 207.01 ms │    no change │
│ QQuery 18 │        124.62 / 126.07 ±1.54 / 128.83 ms │        122.66 / 123.58 ±0.87 / 124.86 ms │    no change │
│ QQuery 19 │        153.52 / 154.65 ±0.90 / 156.19 ms │        153.01 / 153.73 ±0.51 / 154.37 ms │    no change │
│ QQuery 20 │           12.93 / 13.22 ±0.26 / 13.58 ms │           12.84 / 13.00 ±0.19 / 13.35 ms │    no change │
│ QQuery 21 │           19.22 / 19.96 ±1.02 / 21.98 ms │           19.02 / 19.41 ±0.24 / 19.69 ms │    no change │
│ QQuery 22 │        474.54 / 484.09 ±9.63 / 502.55 ms │        472.50 / 477.93 ±4.11 / 484.15 ms │    no change │
│ QQuery 23 │     1020.02 / 1027.11 ±5.72 / 1036.27 ms │     1016.03 / 1022.19 ±4.78 / 1029.84 ms │    no change │
│ QQuery 24 │        637.36 / 640.87 ±2.25 / 643.50 ms │        634.17 / 637.04 ±3.95 / 644.88 ms │    no change │
│ QQuery 25 │        305.57 / 309.01 ±2.12 / 311.52 ms │        304.48 / 307.57 ±2.22 / 309.91 ms │    no change │
│ QQuery 26 │           77.01 / 77.47 ±0.42 / 77.98 ms │           75.67 / 76.30 ±0.55 / 76.97 ms │    no change │
│ QQuery 27 │              7.11 / 7.27 ±0.17 / 7.58 ms │              7.06 / 7.18 ±0.14 / 7.44 ms │    no change │
│ QQuery 28 │        149.60 / 151.66 ±2.94 / 157.46 ms │        147.82 / 149.17 ±1.51 / 151.80 ms │    no change │
│ QQuery 29 │        246.44 / 249.69 ±3.27 / 255.87 ms │        244.12 / 246.35 ±1.45 / 247.61 ms │    no change │
│ QQuery 30 │           41.96 / 42.64 ±0.66 / 43.85 ms │           41.81 / 42.12 ±0.33 / 42.71 ms │    no change │
│ QQuery 31 │        165.42 / 166.39 ±0.88 / 168.00 ms │        164.37 / 166.04 ±1.37 / 168.45 ms │    no change │
│ QQuery 32 │           13.20 / 13.51 ±0.30 / 14.06 ms │           12.94 / 13.32 ±0.28 / 13.66 ms │    no change │
│ QQuery 33 │        139.69 / 141.29 ±1.83 / 144.70 ms │        138.26 / 139.99 ±2.03 / 143.97 ms │    no change │
│ QQuery 34 │              6.95 / 7.11 ±0.22 / 7.54 ms │              7.00 / 7.15 ±0.21 / 7.57 ms │    no change │
│ QQuery 35 │        100.84 / 103.68 ±3.72 / 110.98 ms │         99.85 / 101.00 ±0.72 / 101.76 ms │    no change │
│ QQuery 36 │              6.66 / 6.87 ±0.17 / 7.10 ms │              6.77 / 6.93 ±0.12 / 7.11 ms │    no change │
│ QQuery 37 │              8.33 / 8.46 ±0.15 / 8.72 ms │              8.25 / 8.41 ±0.14 / 8.60 ms │    no change │
│ QQuery 38 │           85.10 / 86.14 ±0.60 / 86.74 ms │           85.52 / 88.60 ±3.12 / 94.31 ms │    no change │
│ QQuery 39 │        115.51 / 118.91 ±3.77 / 126.09 ms │        116.21 / 118.44 ±3.74 / 125.91 ms │    no change │
│ QQuery 40 │           93.50 / 96.17 ±1.57 / 98.23 ms │           92.71 / 95.22 ±2.72 / 98.77 ms │    no change │
│ QQuery 41 │           14.45 / 14.65 ±0.22 / 15.08 ms │           14.44 / 14.73 ±0.23 / 15.14 ms │    no change │
│ QQuery 42 │        107.11 / 107.56 ±0.25 / 107.89 ms │        106.45 / 108.35 ±2.60 / 113.48 ms │    no change │
│ QQuery 43 │              5.86 / 5.95 ±0.16 / 6.26 ms │              5.86 / 6.48 ±1.11 / 8.71 ms │ 1.09x slower │
│ QQuery 44 │           11.00 / 11.19 ±0.12 / 11.31 ms │           11.21 / 11.35 ±0.10 / 11.50 ms │    no change │
│ QQuery 45 │           44.37 / 44.68 ±0.23 / 45.05 ms │           44.54 / 45.11 ±0.61 / 46.22 ms │    no change │
│ QQuery 46 │              8.39 / 8.55 ±0.18 / 8.78 ms │              8.41 / 8.59 ±0.18 / 8.92 ms │    no change │
│ QQuery 47 │        690.51 / 696.95 ±6.35 / 709.04 ms │        699.58 / 705.08 ±3.45 / 709.72 ms │    no change │
│ QQuery 48 │        274.33 / 278.83 ±4.30 / 286.94 ms │        271.19 / 278.40 ±6.26 / 289.96 ms │    no change │
│ QQuery 49 │        244.52 / 246.10 ±1.52 / 248.59 ms │        244.66 / 246.56 ±1.62 / 249.46 ms │    no change │
│ QQuery 50 │        186.34 / 189.55 ±5.24 / 199.99 ms │        185.82 / 188.25 ±2.73 / 193.30 ms │    no change │
│ QQuery 51 │        169.73 / 173.18 ±2.16 / 175.99 ms │        172.78 / 173.54 ±0.69 / 174.62 ms │    no change │
│ QQuery 52 │        107.87 / 110.17 ±4.09 / 118.34 ms │        106.63 / 107.23 ±0.53 / 107.98 ms │    no change │
│ QQuery 53 │        102.79 / 103.51 ±0.41 / 104.07 ms │        102.48 / 104.04 ±1.92 / 107.82 ms │    no change │
│ QQuery 54 │        145.84 / 147.90 ±1.39 / 149.48 ms │        144.09 / 146.22 ±2.02 / 149.94 ms │    no change │
│ QQuery 55 │        106.74 / 107.17 ±0.54 / 108.08 ms │        105.71 / 107.16 ±0.91 / 108.29 ms │    no change │
│ QQuery 56 │        140.74 / 141.47 ±1.14 / 143.73 ms │        139.61 / 140.72 ±0.60 / 141.38 ms │    no change │
│ QQuery 57 │        165.54 / 168.22 ±2.30 / 172.18 ms │        164.03 / 165.38 ±1.78 / 168.90 ms │    no change │
│ QQuery 58 │        244.97 / 247.59 ±2.47 / 251.86 ms │        241.94 / 242.98 ±0.79 / 244.07 ms │    no change │
│ QQuery 59 │        194.71 / 196.59 ±1.95 / 200.16 ms │        191.93 / 193.47 ±2.53 / 198.50 ms │    no change │
│ QQuery 60 │        140.15 / 142.54 ±2.23 / 146.47 ms │        139.92 / 141.35 ±1.45 / 144.00 ms │    no change │
│ QQuery 61 │           13.57 / 13.73 ±0.20 / 14.14 ms │           13.56 / 13.67 ±0.13 / 13.91 ms │    no change │
│ QQuery 62 │        859.43 / 862.95 ±3.36 / 869.19 ms │        859.92 / 864.65 ±4.26 / 869.81 ms │    no change │
│ QQuery 63 │        103.09 / 105.47 ±3.29 / 111.76 ms │        103.72 / 104.31 ±0.43 / 104.88 ms │    no change │
│ QQuery 64 │        631.52 / 637.15 ±3.60 / 640.88 ms │        634.87 / 640.71 ±5.53 / 649.38 ms │    no change │
│ QQuery 65 │        241.78 / 244.74 ±2.84 / 249.81 ms │        246.37 / 248.40 ±2.24 / 252.67 ms │    no change │
│ QQuery 66 │        212.96 / 221.00 ±6.58 / 231.55 ms │       217.13 / 229.84 ±12.50 / 251.28 ms │    no change │
│ QQuery 67 │       290.15 / 302.07 ±14.73 / 327.79 ms │        296.45 / 298.53 ±2.12 / 302.61 ms │    no change │
│ QQuery 68 │              8.66 / 8.86 ±0.24 / 9.31 ms │              9.00 / 9.20 ±0.18 / 9.50 ms │    no change │
│ QQuery 69 │          98.64 / 99.99 ±1.87 / 103.68 ms │          98.47 / 99.97 ±0.84 / 100.84 ms │    no change │
│ QQuery 70 │        314.04 / 325.55 ±6.99 / 334.88 ms │        316.89 / 325.03 ±5.15 / 330.56 ms │    no change │
│ QQuery 71 │        133.65 / 135.11 ±1.11 / 137.08 ms │        132.93 / 133.73 ±0.70 / 134.97 ms │    no change │
│ QQuery 72 │        539.56 / 546.56 ±5.61 / 553.74 ms │        538.51 / 546.25 ±5.94 / 554.90 ms │    no change │
│ QQuery 73 │              6.88 / 6.98 ±0.15 / 7.27 ms │              6.74 / 6.93 ±0.16 / 7.22 ms │    no change │
│ QQuery 74 │        559.48 / 563.81 ±5.46 / 574.26 ms │        557.80 / 568.32 ±5.58 / 572.83 ms │    no change │
│ QQuery 75 │        267.63 / 269.67 ±2.40 / 274.37 ms │        265.47 / 268.65 ±2.74 / 273.51 ms │    no change │
│ QQuery 76 │        129.99 / 131.45 ±1.52 / 134.38 ms │        129.51 / 130.86 ±0.80 / 131.74 ms │    no change │
│ QQuery 77 │        187.29 / 188.83 ±0.90 / 189.96 ms │        187.42 / 188.50 ±0.97 / 190.11 ms │    no change │
│ QQuery 78 │        311.25 / 313.74 ±1.30 / 315.00 ms │        309.19 / 312.64 ±2.11 / 314.68 ms │    no change │
│ QQuery 79 │        226.88 / 230.03 ±2.85 / 233.45 ms │        230.68 / 231.75 ±0.97 / 233.37 ms │    no change │
│ QQuery 80 │        301.00 / 302.25 ±1.04 / 303.93 ms │        296.86 / 298.39 ±1.15 / 300.20 ms │    no change │
│ QQuery 81 │           25.92 / 26.43 ±0.47 / 27.22 ms │           25.72 / 25.94 ±0.19 / 26.22 ms │    no change │
│ QQuery 82 │           39.73 / 40.07 ±0.29 / 40.56 ms │           39.09 / 39.24 ±0.11 / 39.38 ms │    no change │
│ QQuery 83 │           35.67 / 36.20 ±0.40 / 36.83 ms │           35.88 / 36.91 ±0.96 / 38.23 ms │    no change │
│ QQuery 84 │           46.29 / 46.53 ±0.16 / 46.78 ms │           45.71 / 46.08 ±0.19 / 46.21 ms │    no change │
│ QQuery 85 │        142.18 / 143.81 ±1.41 / 146.18 ms │        139.64 / 140.27 ±0.54 / 141.01 ms │    no change │
│ QQuery 86 │           37.11 / 37.80 ±0.56 / 38.48 ms │           37.43 / 38.02 ±0.87 / 39.75 ms │    no change │
│ QQuery 87 │              3.57 / 3.68 ±0.16 / 4.00 ms │              3.59 / 3.70 ±0.17 / 4.04 ms │    no change │
│ QQuery 88 │        100.03 / 100.34 ±0.28 / 100.70 ms │         99.77 / 100.22 ±0.31 / 100.65 ms │    no change │
│ QQuery 89 │        118.30 / 120.58 ±3.13 / 126.70 ms │        116.01 / 118.85 ±3.94 / 126.59 ms │    no change │
│ QQuery 90 │           22.45 / 22.88 ±0.56 / 23.94 ms │           22.03 / 22.53 ±0.34 / 23.01 ms │    no change │
│ QQuery 91 │           59.39 / 59.59 ±0.17 / 59.83 ms │           57.10 / 58.07 ±0.65 / 58.84 ms │    no change │
│ QQuery 92 │           56.92 / 58.24 ±1.71 / 61.62 ms │           56.25 / 56.87 ±0.42 / 57.44 ms │    no change │
│ QQuery 93 │        163.29 / 164.17 ±0.58 / 165.08 ms │        160.22 / 161.61 ±1.15 / 163.35 ms │    no change │
│ QQuery 94 │           60.13 / 61.10 ±0.60 / 61.97 ms │           60.95 / 61.44 ±0.64 / 62.68 ms │    no change │
│ QQuery 95 │        112.19 / 112.75 ±0.29 / 112.98 ms │        110.99 / 111.74 ±0.47 / 112.35 ms │    no change │
│ QQuery 96 │           69.94 / 71.67 ±1.47 / 73.87 ms │           67.71 / 68.36 ±0.55 / 69.38 ms │    no change │
│ QQuery 97 │        113.12 / 113.50 ±0.30 / 113.99 ms │        111.50 / 112.55 ±0.63 / 113.15 ms │    no change │
│ QQuery 98 │        149.10 / 150.65 ±1.06 / 151.99 ms │        148.89 / 149.34 ±0.57 / 150.42 ms │    no change │
│ QQuery 99 │ 10672.82 / 10757.58 ±90.44 / 10928.31 ms │ 10700.55 / 10777.06 ±55.01 / 10831.55 ms │    no change │
└───────────┴──────────────────────────────────────────┴──────────────────────────────────────────┴──────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                            ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                            │ 29947.29ms │
│ Total Time (optimize-clickbench-q17-limit)   │ 29905.02ms │
│ Average Time (HEAD)                          │   302.50ms │
│ Average Time (optimize-clickbench-q17-limit) │   302.07ms │
│ Queries Faster                               │          0 │
│ Queries Slower                               │          1 │
│ Queries with No Change                       │         98 │
│ Queries with Failure                         │          0 │
└──────────────────────────────────────────────┴────────────┘

Resource Usage

tpcds — base (merge-base)

Metric Value
Wall time 155.0s
Peak memory 6.4 GiB
Avg memory 5.6 GiB
CPU user 237.8s
CPU sys 7.9s
Peak spill 0 B

tpcds — branch

Metric Value
Wall time 150.0s
Peak memory 6.3 GiB
Avg memory 5.6 GiB
CPU user 237.7s
CPU sys 7.7s
Peak spill 0 B

File an issue against this benchmark runner

@adriangbot
Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

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

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

Comparing HEAD and optimize-clickbench-q17-limit
--------------------
Benchmark clickbench_partitioned.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                  HEAD ┃         optimize-clickbench-q17-limit ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 0  │          1.22 / 4.66 ±6.76 / 18.18 ms │          1.24 / 4.63 ±6.71 / 18.05 ms │     no change │
│ QQuery 1  │        12.81 / 13.15 ±0.17 / 13.28 ms │        13.13 / 13.32 ±0.14 / 13.51 ms │     no change │
│ QQuery 2  │        37.56 / 37.80 ±0.24 / 38.24 ms │        36.57 / 36.81 ±0.20 / 37.16 ms │     no change │
│ QQuery 3  │        31.75 / 32.38 ±0.74 / 33.80 ms │        31.37 / 31.62 ±0.23 / 32.06 ms │     no change │
│ QQuery 4  │     234.47 / 237.20 ±2.59 / 241.42 ms │     232.62 / 235.73 ±2.57 / 238.74 ms │     no change │
│ QQuery 5  │     283.62 / 285.25 ±1.19 / 287.07 ms │     283.71 / 284.55 ±0.62 / 285.15 ms │     no change │
│ QQuery 6  │           6.44 / 7.00 ±0.40 / 7.53 ms │           6.47 / 7.57 ±0.59 / 8.17 ms │  1.08x slower │
│ QQuery 7  │        13.99 / 14.21 ±0.17 / 14.48 ms │        14.40 / 14.50 ±0.07 / 14.60 ms │     no change │
│ QQuery 8  │     324.48 / 327.76 ±2.31 / 331.37 ms │     316.72 / 324.57 ±4.65 / 329.47 ms │     no change │
│ QQuery 9  │     455.21 / 466.78 ±5.85 / 470.97 ms │     456.14 / 470.04 ±9.28 / 480.22 ms │     no change │
│ QQuery 10 │        75.14 / 75.74 ±0.34 / 76.06 ms │        74.15 / 74.78 ±0.72 / 75.96 ms │     no change │
│ QQuery 11 │        86.32 / 87.01 ±0.59 / 87.82 ms │        85.75 / 87.71 ±2.75 / 93.09 ms │     no change │
│ QQuery 12 │     276.58 / 279.67 ±3.76 / 287.08 ms │     275.36 / 279.93 ±4.07 / 286.56 ms │     no change │
│ QQuery 13 │     384.40 / 392.03 ±5.50 / 401.30 ms │     388.30 / 392.82 ±3.53 / 398.74 ms │     no change │
│ QQuery 14 │     286.07 / 291.37 ±4.54 / 299.03 ms │     285.04 / 290.23 ±3.62 / 295.73 ms │     no change │
│ QQuery 15 │     278.98 / 281.80 ±2.61 / 286.13 ms │     278.22 / 280.93 ±2.36 / 284.58 ms │     no change │
│ QQuery 16 │     610.19 / 621.23 ±6.93 / 630.03 ms │    614.45 / 624.19 ±13.27 / 650.34 ms │     no change │
│ QQuery 17 │     617.61 / 625.89 ±5.69 / 633.40 ms │     321.50 / 327.77 ±8.53 / 344.33 ms │ +1.91x faster │
│ QQuery 18 │  1260.60 / 1272.58 ±7.13 / 1280.58 ms │ 1236.62 / 1261.56 ±15.85 / 1286.42 ms │     no change │
│ QQuery 19 │        29.29 / 34.48 ±9.33 / 53.12 ms │       28.94 / 34.30 ±10.46 / 55.22 ms │     no change │
│ QQuery 20 │     519.87 / 528.02 ±7.94 / 542.17 ms │     519.31 / 524.14 ±4.18 / 529.62 ms │     no change │
│ QQuery 21 │     596.16 / 602.78 ±4.86 / 610.85 ms │     597.02 / 606.46 ±6.88 / 614.87 ms │     no change │
│ QQuery 22 │ 1065.36 / 1079.09 ±10.65 / 1095.25 ms │  1064.42 / 1077.33 ±8.14 / 1087.83 ms │     no change │
│ QQuery 23 │ 3359.18 / 3387.02 ±24.79 / 3432.13 ms │ 3307.92 / 3339.17 ±18.79 / 3359.36 ms │     no change │
│ QQuery 24 │        42.49 / 43.27 ±0.65 / 44.28 ms │        42.61 / 48.16 ±9.54 / 67.15 ms │  1.11x slower │
│ QQuery 25 │     115.33 / 118.79 ±3.31 / 123.16 ms │     113.81 / 119.05 ±7.80 / 134.46 ms │     no change │
│ QQuery 26 │        43.28 / 44.77 ±1.03 / 45.79 ms │        42.74 / 43.61 ±0.74 / 44.90 ms │     no change │
│ QQuery 27 │     671.68 / 677.21 ±3.86 / 683.17 ms │     674.99 / 683.10 ±7.88 / 695.78 ms │     no change │
│ QQuery 28 │ 3005.87 / 3022.04 ±10.35 / 3035.94 ms │  3000.24 / 3012.65 ±6.42 / 3018.13 ms │     no change │
│ QQuery 29 │        42.74 / 47.23 ±5.18 / 55.03 ms │        42.66 / 43.55 ±1.15 / 45.82 ms │ +1.08x faster │
│ QQuery 30 │     310.89 / 317.25 ±6.81 / 328.19 ms │     304.48 / 314.72 ±5.32 / 320.00 ms │     no change │
│ QQuery 31 │     301.27 / 309.73 ±6.18 / 320.16 ms │     302.88 / 305.73 ±3.23 / 310.95 ms │     no change │
│ QQuery 32 │    992.62 / 998.10 ±3.85 / 1002.93 ms │   980.18 / 991.03 ±13.78 / 1017.14 ms │     no change │
│ QQuery 33 │ 1421.79 / 1451.58 ±23.75 / 1482.43 ms │ 1414.41 / 1436.48 ±16.68 / 1461.82 ms │     no change │
│ QQuery 34 │ 1446.79 / 1473.12 ±25.42 / 1521.43 ms │ 1437.79 / 1465.51 ±27.01 / 1512.70 ms │     no change │
│ QQuery 35 │    286.00 / 305.22 ±28.44 / 360.04 ms │     280.46 / 288.48 ±7.47 / 301.81 ms │ +1.06x faster │
│ QQuery 36 │        64.05 / 69.33 ±4.23 / 74.12 ms │        61.99 / 68.74 ±7.26 / 82.16 ms │     no change │
│ QQuery 37 │        35.96 / 39.85 ±5.60 / 50.91 ms │        35.80 / 39.48 ±4.28 / 46.32 ms │     no change │
│ QQuery 38 │        40.73 / 43.02 ±1.43 / 44.49 ms │        41.05 / 43.71 ±2.15 / 47.24 ms │     no change │
│ QQuery 39 │     128.26 / 133.47 ±3.81 / 137.23 ms │     126.09 / 130.12 ±3.17 / 135.42 ms │     no change │
│ QQuery 40 │        14.47 / 16.94 ±2.58 / 21.67 ms │        14.80 / 17.25 ±4.54 / 26.32 ms │     no change │
│ QQuery 41 │        14.09 / 16.36 ±3.98 / 24.32 ms │        13.95 / 15.48 ±2.70 / 20.88 ms │ +1.06x faster │
│ QQuery 42 │        13.60 / 13.83 ±0.17 / 14.03 ms │        13.45 / 14.38 ±1.43 / 17.22 ms │     no change │
└───────────┴───────────────────────────────────────┴───────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                            ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                            │ 20126.00ms │
│ Total Time (optimize-clickbench-q17-limit)   │ 19705.88ms │
│ Average Time (HEAD)                          │   468.05ms │
│ Average Time (optimize-clickbench-q17-limit) │   458.28ms │
│ Queries Faster                               │          4 │
│ Queries Slower                               │          2 │
│ Queries with No Change                       │         37 │
│ Queries with Failure                         │          0 │
└──────────────────────────────────────────────┴────────────┘

Resource Usage

clickbench_partitioned — base (merge-base)

Metric Value
Wall time 105.0s
Peak memory 30.4 GiB
Avg memory 23.1 GiB
CPU user 1065.2s
CPU sys 63.4s
Peak spill 0 B

clickbench_partitioned — branch

Metric Value
Wall time 100.0s
Peak memory 31.0 GiB
Avg memory 23.0 GiB
CPU user 1040.8s
CPU sys 62.3s
Peak spill 0 B

File an issue against this benchmark runner

@github-actions github-actions Bot removed core Core DataFusion crate physical-plan Changes to the physical-plan crate labels May 4, 2026
@Dandandan
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-c4370782076-2004-7ssg2 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 optimize-clickbench-q17-limit (d611742) to 948cd09 (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-c4370782076-2005-dpblk 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 optimize-clickbench-q17-limit (d611742) to 948cd09 (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-c4370782076-2006-wbjnk 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 optimize-clickbench-q17-limit (d611742) to 948cd09 (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 optimize-clickbench-q17-limit
--------------------
Benchmark tpch_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Query     ┃                           HEAD ┃  optimize-clickbench-q17-limit ┃    Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ QQuery 1  │ 40.67 / 41.59 ±1.16 / 43.66 ms │ 40.60 / 41.80 ±1.35 / 43.46 ms │ no change │
│ QQuery 2  │ 21.70 / 22.12 ±0.46 / 23.00 ms │ 21.27 / 21.50 ±0.14 / 21.64 ms │ no change │
│ QQuery 3  │ 37.15 / 39.58 ±1.23 / 40.47 ms │ 38.94 / 40.02 ±0.60 / 40.72 ms │ no change │
│ QQuery 4  │ 18.63 / 18.97 ±0.45 / 19.82 ms │ 18.54 / 18.76 ±0.14 / 18.92 ms │ no change │
│ QQuery 5  │ 45.84 / 47.04 ±0.88 / 48.15 ms │ 44.68 / 46.75 ±1.23 / 48.03 ms │ no change │
│ QQuery 6  │ 17.45 / 17.68 ±0.15 / 17.87 ms │ 17.59 / 18.28 ±0.81 / 19.88 ms │ no change │
│ QQuery 7  │ 52.51 / 53.76 ±1.14 / 55.41 ms │ 50.56 / 52.37 ±1.97 / 56.16 ms │ no change │
│ QQuery 8  │ 47.93 / 48.23 ±0.17 / 48.39 ms │ 47.83 / 48.41 ±0.62 / 49.62 ms │ no change │
│ QQuery 9  │ 52.92 / 53.61 ±0.39 / 54.05 ms │ 52.54 / 53.42 ±0.67 / 54.07 ms │ no change │
│ QQuery 10 │ 66.75 / 67.72 ±0.87 / 69.19 ms │ 66.44 / 67.33 ±1.07 / 69.43 ms │ no change │
│ QQuery 11 │ 14.44 / 14.68 ±0.21 / 15.00 ms │ 14.50 / 14.67 ±0.11 / 14.79 ms │ no change │
│ QQuery 12 │ 26.89 / 27.36 ±0.42 / 28.01 ms │ 26.66 / 27.04 ±0.23 / 27.24 ms │ no change │
│ QQuery 13 │ 36.31 / 37.18 ±0.74 / 38.24 ms │ 36.64 / 36.91 ±0.24 / 37.27 ms │ no change │
│ QQuery 14 │ 27.50 / 28.27 ±1.05 / 30.35 ms │ 27.44 / 28.26 ±1.22 / 30.66 ms │ no change │
│ QQuery 15 │ 34.17 / 34.59 ±0.24 / 34.86 ms │ 34.00 / 34.56 ±0.64 / 35.82 ms │ no change │
│ QQuery 16 │ 15.85 / 15.99 ±0.11 / 16.19 ms │ 15.71 / 15.81 ±0.11 / 16.03 ms │ no change │
│ QQuery 17 │ 79.10 / 79.73 ±0.45 / 80.38 ms │ 79.07 / 80.02 ±0.94 / 81.19 ms │ no change │
│ QQuery 18 │ 70.87 / 72.18 ±1.12 / 73.58 ms │ 70.81 / 71.24 ±0.43 / 72.05 ms │ no change │
│ QQuery 19 │ 38.79 / 38.95 ±0.13 / 39.15 ms │ 38.31 / 38.87 ±0.53 / 39.77 ms │ no change │
│ QQuery 20 │ 39.96 / 41.11 ±1.77 / 44.64 ms │ 39.96 / 40.01 ±0.03 / 40.05 ms │ no change │
│ QQuery 21 │ 62.43 / 64.52 ±1.65 / 67.50 ms │ 62.59 / 63.02 ±0.45 / 63.83 ms │ no change │
│ QQuery 22 │ 24.45 / 24.67 ±0.21 / 25.06 ms │ 24.53 / 25.15 ±0.46 / 25.94 ms │ no change │
└───────────┴────────────────────────────────┴────────────────────────────────┴───────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┓
┃ Benchmark Summary                            ┃          ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━┩
│ Total Time (HEAD)                            │ 889.53ms │
│ Total Time (optimize-clickbench-q17-limit)   │ 884.19ms │
│ Average Time (HEAD)                          │  40.43ms │
│ Average Time (optimize-clickbench-q17-limit) │  40.19ms │
│ Queries Faster                               │        0 │
│ Queries Slower                               │        0 │
│ Queries with No Change                       │       22 │
│ Queries with Failure                         │        0 │
└──────────────────────────────────────────────┴──────────┘

Resource Usage

tpch — base (merge-base)

Metric Value
Wall time 5.0s
Peak memory 5.5 GiB
Avg memory 5.0 GiB
CPU user 33.1s
CPU sys 2.3s
Peak spill 0 B

tpch — branch

Metric Value
Wall time 5.0s
Peak memory 5.5 GiB
Avg memory 5.0 GiB
CPU user 33.1s
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 optimize-clickbench-q17-limit
--------------------
Benchmark clickbench_partitioned.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                  HEAD ┃         optimize-clickbench-q17-limit ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 0  │          1.21 / 4.59 ±6.67 / 17.93 ms │          1.19 / 4.53 ±6.64 / 17.80 ms │     no change │
│ QQuery 1  │        12.86 / 13.24 ±0.24 / 13.51 ms │        12.22 / 12.51 ±0.16 / 12.66 ms │ +1.06x faster │
│ QQuery 2  │        36.62 / 36.89 ±0.21 / 37.23 ms │        36.83 / 37.03 ±0.19 / 37.40 ms │     no change │
│ QQuery 3  │        31.57 / 32.20 ±0.61 / 33.33 ms │        30.96 / 31.40 ±0.43 / 32.18 ms │     no change │
│ QQuery 4  │     231.46 / 233.00 ±1.21 / 235.15 ms │     226.69 / 232.25 ±4.56 / 238.02 ms │     no change │
│ QQuery 5  │     278.95 / 280.62 ±1.91 / 284.21 ms │     274.97 / 277.67 ±1.87 / 280.75 ms │     no change │
│ QQuery 6  │           6.23 / 6.97 ±0.55 / 7.79 ms │           6.43 / 7.11 ±0.57 / 8.07 ms │     no change │
│ QQuery 7  │        14.22 / 15.66 ±1.40 / 17.93 ms │        13.26 / 13.37 ±0.12 / 13.60 ms │ +1.17x faster │
│ QQuery 8  │     316.67 / 319.27 ±1.72 / 320.96 ms │     312.40 / 315.76 ±2.13 / 318.51 ms │     no change │
│ QQuery 9  │     446.91 / 454.25 ±5.14 / 460.47 ms │     450.78 / 454.70 ±4.88 / 464.32 ms │     no change │
│ QQuery 10 │        75.47 / 76.34 ±1.17 / 78.65 ms │        71.58 / 72.53 ±0.83 / 73.96 ms │     no change │
│ QQuery 11 │        87.25 / 89.70 ±2.40 / 93.09 ms │        82.73 / 85.61 ±4.03 / 93.47 ms │     no change │
│ QQuery 12 │     273.00 / 275.76 ±2.88 / 280.39 ms │     268.23 / 271.16 ±3.34 / 276.97 ms │     no change │
│ QQuery 13 │     383.49 / 389.65 ±6.13 / 399.89 ms │     386.38 / 393.65 ±7.22 / 407.15 ms │     no change │
│ QQuery 14 │     282.25 / 285.14 ±3.11 / 290.97 ms │     278.57 / 281.20 ±1.69 / 282.81 ms │     no change │
│ QQuery 15 │     271.85 / 275.46 ±3.29 / 280.79 ms │     268.12 / 275.63 ±7.49 / 289.41 ms │     no change │
│ QQuery 16 │    605.19 / 615.63 ±10.51 / 634.89 ms │    602.91 / 620.54 ±14.46 / 646.28 ms │     no change │
│ QQuery 17 │     605.88 / 613.50 ±7.15 / 626.68 ms │    145.80 / 152.70 ±10.91 / 174.43 ms │ +4.02x faster │
│ QQuery 18 │ 1211.27 / 1240.33 ±18.71 / 1267.13 ms │  1233.88 / 1247.21 ±8.51 / 1257.48 ms │     no change │
│ QQuery 19 │        29.11 / 30.55 ±1.78 / 33.96 ms │        28.73 / 28.88 ±0.12 / 29.02 ms │ +1.06x faster │
│ QQuery 20 │     518.25 / 528.46 ±9.53 / 540.58 ms │     522.31 / 526.72 ±3.52 / 532.56 ms │     no change │
│ QQuery 21 │     592.74 / 600.56 ±4.37 / 604.37 ms │     591.66 / 598.22 ±5.57 / 608.05 ms │     no change │
│ QQuery 22 │ 1063.05 / 1079.93 ±10.67 / 1091.97 ms │  1059.21 / 1069.34 ±9.05 / 1083.45 ms │     no change │
│ QQuery 23 │ 3337.35 / 3353.65 ±13.08 / 3375.61 ms │ 3303.28 / 3331.63 ±35.84 / 3401.54 ms │     no change │
│ QQuery 24 │        41.97 / 44.78 ±4.66 / 54.05 ms │        41.84 / 45.65 ±4.57 / 54.60 ms │     no change │
│ QQuery 25 │     114.89 / 119.03 ±7.52 / 134.06 ms │     112.09 / 113.56 ±1.11 / 115.30 ms │     no change │
│ QQuery 26 │        42.24 / 43.03 ±0.74 / 44.37 ms │        43.20 / 44.96 ±1.44 / 47.47 ms │     no change │
│ QQuery 27 │     665.69 / 673.07 ±7.60 / 686.82 ms │     670.44 / 680.07 ±5.49 / 687.57 ms │     no change │
│ QQuery 28 │  2998.61 / 3003.28 ±5.95 / 3014.79 ms │  3001.56 / 3009.61 ±7.64 / 3022.76 ms │     no change │
│ QQuery 29 │        42.20 / 48.67 ±7.55 / 58.10 ms │        42.67 / 45.60 ±5.23 / 56.02 ms │ +1.07x faster │
│ QQuery 30 │     305.43 / 308.62 ±2.28 / 311.67 ms │     305.43 / 312.06 ±3.70 / 315.99 ms │     no change │
│ QQuery 31 │     298.44 / 304.42 ±4.48 / 311.12 ms │     296.15 / 303.84 ±4.57 / 309.83 ms │     no change │
│ QQuery 32 │   961.35 / 982.18 ±17.70 / 1007.74 ms │     978.68 / 982.09 ±1.87 / 984.32 ms │     no change │
│ QQuery 33 │ 1403.55 / 1436.76 ±28.04 / 1480.89 ms │ 1414.09 / 1436.70 ±14.69 / 1458.58 ms │     no change │
│ QQuery 34 │ 1420.83 / 1445.28 ±20.44 / 1474.37 ms │ 1433.78 / 1469.90 ±33.65 / 1525.21 ms │     no change │
│ QQuery 35 │     277.73 / 284.16 ±4.81 / 291.85 ms │    280.46 / 296.99 ±16.53 / 324.83 ms │     no change │
│ QQuery 36 │        59.91 / 67.24 ±5.35 / 76.51 ms │        61.34 / 65.54 ±4.31 / 72.53 ms │     no change │
│ QQuery 37 │        36.02 / 36.74 ±0.88 / 38.40 ms │        35.49 / 38.70 ±2.76 / 43.12 ms │  1.05x slower │
│ QQuery 38 │        40.41 / 42.23 ±1.23 / 43.67 ms │        41.00 / 45.25 ±3.94 / 51.73 ms │  1.07x slower │
│ QQuery 39 │     123.14 / 127.19 ±2.10 / 129.01 ms │     124.48 / 136.57 ±8.98 / 150.84 ms │  1.07x slower │
│ QQuery 40 │        13.84 / 15.06 ±1.19 / 17.16 ms │        13.83 / 14.34 ±0.55 / 15.25 ms │     no change │
│ QQuery 41 │        13.57 / 15.91 ±3.97 / 23.83 ms │        13.54 / 14.40 ±1.49 / 17.38 ms │ +1.10x faster │
│ QQuery 42 │        13.01 / 13.16 ±0.19 / 13.52 ms │        13.02 / 14.69 ±2.66 / 19.99 ms │  1.12x slower │
└───────────┴───────────────────────────────────────┴───────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                            ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                            │ 19862.18ms │
│ Total Time (optimize-clickbench-q17-limit)   │ 19411.87ms │
│ Average Time (HEAD)                          │   461.91ms │
│ Average Time (optimize-clickbench-q17-limit) │   451.44ms │
│ Queries Faster                               │          6 │
│ Queries Slower                               │          4 │
│ Queries with No Change                       │         33 │
│ Queries with Failure                         │          0 │
└──────────────────────────────────────────────┴────────────┘

Resource Usage

clickbench_partitioned — base (merge-base)

Metric Value
Wall time 100.0s
Peak memory 29.7 GiB
Avg memory 23.1 GiB
CPU user 1050.5s
CPU sys 62.8s
Peak spill 0 B

clickbench_partitioned — branch

Metric Value
Wall time 100.0s
Peak memory 29.9 GiB
Avg memory 23.0 GiB
CPU user 1022.6s
CPU sys 62.8s
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 optimize-clickbench-q17-limit
--------------------
Benchmark tpcds_sf1.json
--------------------
┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Query     ┃                                      HEAD ┃             optimize-clickbench-q17-limit ┃        Change ┃
┡━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ QQuery 1  │               7.24 / 7.70 ±0.83 / 9.36 ms │               7.07 / 7.67 ±0.88 / 9.42 ms │     no change │
│ QQuery 2  │         147.16 / 147.81 ±0.77 / 149.26 ms │         146.03 / 146.74 ±0.53 / 147.36 ms │     no change │
│ QQuery 3  │         114.55 / 115.75 ±1.18 / 117.75 ms │         114.61 / 115.89 ±0.93 / 117.04 ms │     no change │
│ QQuery 4  │     1358.26 / 1382.38 ±14.68 / 1404.18 ms │     1311.39 / 1374.59 ±36.59 / 1423.90 ms │     no change │
│ QQuery 5  │         174.84 / 177.65 ±1.55 / 179.13 ms │         175.35 / 176.77 ±1.36 / 179.01 ms │     no change │
│ QQuery 6  │        142.33 / 162.90 ±10.36 / 170.23 ms │        141.36 / 148.96 ±11.63 / 172.14 ms │ +1.09x faster │
│ QQuery 7  │         327.65 / 330.35 ±2.05 / 332.93 ms │         320.86 / 323.68 ±1.77 / 325.25 ms │     no change │
│ QQuery 8  │         114.46 / 115.62 ±0.60 / 116.12 ms │         113.51 / 114.93 ±1.44 / 117.23 ms │     no change │
│ QQuery 9  │          97.89 / 101.32 ±3.01 / 105.42 ms │         93.62 / 110.12 ±10.67 / 125.73 ms │  1.09x slower │
│ QQuery 10 │         104.69 / 106.85 ±2.50 / 111.73 ms │         102.68 / 105.32 ±2.73 / 110.45 ms │     no change │
│ QQuery 11 │       936.08 / 994.35 ±38.64 / 1033.56 ms │        911.90 / 926.51 ±14.64 / 951.49 ms │ +1.07x faster │
│ QQuery 12 │            44.69 / 45.14 ±0.42 / 45.79 ms │            43.55 / 43.92 ±0.27 / 44.32 ms │     no change │
│ QQuery 13 │         392.76 / 402.93 ±5.91 / 411.03 ms │         392.81 / 397.13 ±3.88 / 403.25 ms │     no change │
│ QQuery 14 │     1044.64 / 1057.03 ±13.59 / 1081.79 ms │      1038.57 / 1045.71 ±6.06 / 1056.33 ms │     no change │
│ QQuery 15 │            15.73 / 16.10 ±0.20 / 16.37 ms │            15.01 / 15.29 ±0.18 / 15.50 ms │ +1.05x faster │
│ QQuery 16 │               8.18 / 8.28 ±0.10 / 8.44 ms │               7.74 / 7.92 ±0.17 / 8.22 ms │     no change │
│ QQuery 17 │         216.03 / 217.59 ±1.54 / 220.06 ms │         205.44 / 208.36 ±3.72 / 215.56 ms │     no change │
│ QQuery 18 │         129.91 / 130.78 ±0.45 / 131.15 ms │         124.48 / 126.95 ±1.49 / 129.02 ms │     no change │
│ QQuery 19 │         165.06 / 167.93 ±2.61 / 172.78 ms │         154.29 / 160.49 ±3.50 / 164.90 ms │     no change │
│ QQuery 20 │            13.55 / 14.05 ±0.52 / 14.87 ms │            13.63 / 13.87 ±0.26 / 14.23 ms │     no change │
│ QQuery 21 │            19.95 / 20.56 ±0.31 / 20.76 ms │            19.86 / 20.27 ±0.35 / 20.75 ms │     no change │
│ QQuery 22 │         477.04 / 487.34 ±5.73 / 492.49 ms │         477.28 / 492.33 ±9.06 / 502.05 ms │     no change │
│ QQuery 23 │     1038.98 / 1060.82 ±24.62 / 1102.99 ms │      1059.40 / 1071.27 ±9.21 / 1084.93 ms │     no change │
│ QQuery 24 │        653.33 / 670.12 ±14.49 / 688.96 ms │         666.97 / 673.91 ±4.92 / 681.93 ms │     no change │
│ QQuery 25 │         308.51 / 313.83 ±3.82 / 318.42 ms │         317.25 / 322.65 ±5.44 / 332.83 ms │     no change │
│ QQuery 26 │            76.73 / 77.30 ±0.67 / 78.56 ms │            78.11 / 78.37 ±0.33 / 78.95 ms │     no change │
│ QQuery 27 │               7.02 / 7.20 ±0.22 / 7.63 ms │               7.61 / 7.73 ±0.09 / 7.83 ms │  1.07x slower │
│ QQuery 28 │         149.08 / 155.87 ±7.23 / 169.13 ms │         152.35 / 153.63 ±0.89 / 155.08 ms │     no change │
│ QQuery 29 │         250.59 / 258.67 ±4.66 / 264.69 ms │         251.38 / 256.72 ±4.93 / 265.72 ms │     no change │
│ QQuery 30 │            41.97 / 42.65 ±0.42 / 43.12 ms │            42.86 / 43.58 ±0.42 / 44.09 ms │     no change │
│ QQuery 31 │         167.15 / 170.76 ±4.31 / 178.57 ms │         169.74 / 171.76 ±2.07 / 175.57 ms │     no change │
│ QQuery 32 │            13.48 / 13.67 ±0.20 / 14.01 ms │            13.41 / 13.86 ±0.30 / 14.19 ms │     no change │
│ QQuery 33 │         139.62 / 143.48 ±5.17 / 153.55 ms │         138.20 / 140.77 ±1.32 / 141.86 ms │     no change │
│ QQuery 34 │               7.12 / 7.26 ±0.18 / 7.59 ms │               7.17 / 7.34 ±0.17 / 7.65 ms │     no change │
│ QQuery 35 │         102.17 / 103.91 ±2.28 / 108.33 ms │         102.54 / 104.08 ±2.24 / 108.53 ms │     no change │
│ QQuery 36 │              7.27 / 8.99 ±2.97 / 14.92 ms │               6.73 / 7.00 ±0.14 / 7.11 ms │ +1.28x faster │
│ QQuery 37 │               8.39 / 8.75 ±0.28 / 9.09 ms │               8.32 / 8.57 ±0.20 / 8.84 ms │     no change │
│ QQuery 38 │            86.22 / 88.37 ±1.51 / 90.38 ms │            85.66 / 87.02 ±0.87 / 88.37 ms │     no change │
│ QQuery 39 │         117.50 / 124.34 ±9.40 / 142.81 ms │         119.58 / 125.50 ±3.88 / 130.30 ms │     no change │
│ QQuery 40 │           94.01 / 97.76 ±2.66 / 102.11 ms │         101.10 / 104.13 ±1.96 / 106.93 ms │  1.07x slower │
│ QQuery 41 │            14.85 / 15.01 ±0.20 / 15.39 ms │            15.20 / 15.35 ±0.07 / 15.41 ms │     no change │
│ QQuery 42 │         108.42 / 110.77 ±1.65 / 113.57 ms │         108.75 / 110.16 ±1.51 / 112.36 ms │     no change │
│ QQuery 43 │               6.41 / 6.49 ±0.07 / 6.58 ms │               5.96 / 6.06 ±0.16 / 6.39 ms │ +1.07x faster │
│ QQuery 44 │            11.94 / 12.25 ±0.19 / 12.46 ms │            11.30 / 11.49 ±0.18 / 11.78 ms │ +1.07x faster │
│ QQuery 45 │            44.96 / 46.57 ±1.60 / 48.84 ms │            44.69 / 46.31 ±1.93 / 50.00 ms │     no change │
│ QQuery 46 │               8.50 / 8.72 ±0.26 / 9.24 ms │               8.70 / 8.84 ±0.21 / 9.24 ms │     no change │
│ QQuery 47 │        695.69 / 729.10 ±19.68 / 754.30 ms │        706.51 / 796.39 ±45.07 / 822.35 ms │  1.09x slower │
│ QQuery 48 │         274.34 / 281.41 ±4.75 / 287.50 ms │         284.50 / 292.22 ±7.38 / 306.23 ms │     no change │
│ QQuery 49 │         243.97 / 247.33 ±2.68 / 252.10 ms │         247.28 / 252.18 ±3.12 / 255.65 ms │     no change │
│ QQuery 50 │         183.96 / 193.33 ±8.24 / 206.85 ms │        185.39 / 192.73 ±11.11 / 214.77 ms │     no change │
│ QQuery 51 │         172.59 / 177.87 ±6.05 / 188.29 ms │         174.04 / 177.47 ±4.74 / 186.69 ms │     no change │
│ QQuery 52 │         108.11 / 110.73 ±2.64 / 114.79 ms │         107.76 / 111.59 ±3.65 / 118.07 ms │     no change │
│ QQuery 53 │         103.32 / 104.46 ±1.44 / 107.16 ms │         103.40 / 104.42 ±0.96 / 106.06 ms │     no change │
│ QQuery 54 │         146.08 / 150.08 ±3.08 / 155.28 ms │         151.02 / 154.27 ±2.38 / 158.32 ms │     no change │
│ QQuery 55 │         107.83 / 108.36 ±0.73 / 109.80 ms │         108.67 / 109.86 ±1.36 / 112.45 ms │     no change │
│ QQuery 56 │         139.67 / 143.79 ±3.08 / 148.76 ms │         139.18 / 143.57 ±3.28 / 147.55 ms │     no change │
│ QQuery 57 │         165.74 / 169.16 ±2.71 / 172.57 ms │         164.55 / 167.74 ±2.73 / 172.43 ms │     no change │
│ QQuery 58 │         247.10 / 250.44 ±3.14 / 255.66 ms │         246.83 / 247.39 ±0.39 / 248.03 ms │     no change │
│ QQuery 59 │         198.82 / 202.47 ±2.31 / 205.55 ms │         203.64 / 205.76 ±2.37 / 209.71 ms │     no change │
│ QQuery 60 │         144.52 / 146.12 ±0.87 / 147.17 ms │         148.02 / 150.17 ±1.60 / 152.31 ms │     no change │
│ QQuery 61 │            13.77 / 13.88 ±0.11 / 14.08 ms │            14.66 / 14.76 ±0.05 / 14.81 ms │  1.06x slower │
│ QQuery 62 │         881.80 / 896.98 ±9.63 / 908.93 ms │        880.95 / 910.28 ±18.53 / 929.24 ms │     no change │
│ QQuery 63 │         105.02 / 107.66 ±2.10 / 110.16 ms │         104.22 / 106.24 ±1.73 / 109.13 ms │     no change │
│ QQuery 64 │         648.12 / 657.63 ±6.42 / 664.79 ms │         638.37 / 644.08 ±5.82 / 652.73 ms │     no change │
│ QQuery 65 │         257.38 / 265.27 ±4.81 / 270.32 ms │         247.87 / 259.03 ±8.77 / 269.34 ms │     no change │
│ QQuery 66 │        223.00 / 237.53 ±13.70 / 260.50 ms │        220.73 / 235.07 ±10.37 / 252.09 ms │     no change │
│ QQuery 67 │         308.82 / 313.62 ±5.13 / 322.90 ms │         294.21 / 303.00 ±9.29 / 318.84 ms │     no change │
│ QQuery 68 │             9.39 / 10.24 ±1.43 / 13.09 ms │               8.87 / 9.02 ±0.17 / 9.34 ms │ +1.14x faster │
│ QQuery 69 │         102.36 / 104.54 ±3.02 / 110.51 ms │          98.15 / 101.28 ±2.90 / 105.91 ms │     no change │
│ QQuery 70 │         322.67 / 337.56 ±8.32 / 345.48 ms │         312.09 / 321.11 ±6.63 / 331.93 ms │     no change │
│ QQuery 71 │         136.31 / 137.66 ±1.06 / 139.35 ms │         134.36 / 137.58 ±3.94 / 144.59 ms │     no change │
│ QQuery 72 │         556.24 / 567.96 ±9.48 / 583.86 ms │         547.60 / 559.04 ±7.96 / 572.03 ms │     no change │
│ QQuery 73 │               7.54 / 7.64 ±0.08 / 7.75 ms │               6.80 / 6.96 ±0.22 / 7.38 ms │ +1.10x faster │
│ QQuery 74 │         655.83 / 662.21 ±7.01 / 675.37 ms │         588.03 / 597.52 ±8.01 / 607.10 ms │ +1.11x faster │
│ QQuery 75 │         275.72 / 280.18 ±5.03 / 289.98 ms │         268.22 / 271.47 ±3.97 / 278.80 ms │     no change │
│ QQuery 76 │         136.60 / 137.83 ±0.78 / 139.03 ms │         132.14 / 134.46 ±2.10 / 137.30 ms │     no change │
│ QQuery 77 │         189.15 / 192.83 ±2.80 / 196.93 ms │         190.40 / 191.87 ±2.31 / 196.47 ms │     no change │
│ QQuery 78 │         311.96 / 317.89 ±3.80 / 322.54 ms │         316.02 / 324.13 ±4.49 / 329.38 ms │     no change │
│ QQuery 79 │         233.99 / 239.82 ±5.22 / 249.55 ms │         233.12 / 243.27 ±8.62 / 257.81 ms │     no change │
│ QQuery 80 │         304.67 / 307.96 ±3.62 / 313.97 ms │         306.87 / 307.70 ±1.27 / 310.20 ms │     no change │
│ QQuery 81 │            26.98 / 27.29 ±0.39 / 28.04 ms │            27.21 / 27.99 ±0.53 / 28.62 ms │     no change │
│ QQuery 82 │            40.64 / 40.88 ±0.27 / 41.37 ms │            40.72 / 42.02 ±1.62 / 45.21 ms │     no change │
│ QQuery 83 │            36.72 / 36.94 ±0.24 / 37.41 ms │            36.15 / 36.39 ±0.25 / 36.84 ms │     no change │
│ QQuery 84 │            47.28 / 47.60 ±0.21 / 47.92 ms │            46.80 / 47.26 ±0.54 / 48.29 ms │     no change │
│ QQuery 85 │         144.57 / 145.12 ±0.47 / 145.79 ms │         141.10 / 143.91 ±1.94 / 147.11 ms │     no change │
│ QQuery 86 │            37.80 / 38.44 ±0.41 / 38.85 ms │            37.97 / 38.12 ±0.19 / 38.48 ms │     no change │
│ QQuery 87 │               3.66 / 3.77 ±0.15 / 4.08 ms │               3.62 / 3.73 ±0.20 / 4.12 ms │     no change │
│ QQuery 88 │         100.36 / 101.97 ±2.53 / 107.01 ms │         103.26 / 104.31 ±0.64 / 104.97 ms │     no change │
│ QQuery 89 │         117.73 / 120.00 ±2.70 / 125.30 ms │         120.24 / 123.59 ±4.82 / 133.07 ms │     no change │
│ QQuery 90 │            23.03 / 23.48 ±0.36 / 24.11 ms │            23.99 / 24.30 ±0.21 / 24.55 ms │     no change │
│ QQuery 91 │            59.27 / 60.19 ±0.78 / 61.42 ms │            60.84 / 61.48 ±0.42 / 61.97 ms │     no change │
│ QQuery 92 │            56.21 / 57.09 ±0.47 / 57.57 ms │            57.49 / 58.68 ±1.48 / 61.59 ms │     no change │
│ QQuery 93 │         162.74 / 167.94 ±3.23 / 172.31 ms │         167.08 / 170.56 ±2.42 / 173.66 ms │     no change │
│ QQuery 94 │            62.50 / 62.93 ±0.34 / 63.45 ms │            61.44 / 62.38 ±0.55 / 63.10 ms │     no change │
│ QQuery 95 │         115.79 / 118.67 ±2.42 / 123.13 ms │         114.74 / 116.10 ±0.96 / 117.72 ms │     no change │
│ QQuery 96 │            72.51 / 73.79 ±1.06 / 75.75 ms │            69.10 / 71.77 ±2.94 / 77.42 ms │     no change │
│ QQuery 97 │         122.60 / 123.95 ±1.41 / 126.56 ms │         118.12 / 119.82 ±1.46 / 121.92 ms │     no change │
│ QQuery 98 │         150.43 / 155.06 ±5.35 / 165.31 ms │         154.77 / 159.61 ±2.47 / 161.35 ms │     no change │
│ QQuery 99 │ 10776.37 / 10920.37 ±131.30 / 11098.17 ms │ 10843.67 / 11029.74 ±113.37 / 11183.67 ms │     no change │
└───────────┴───────────────────────────────────────────┴───────────────────────────────────────────┴───────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Benchmark Summary                            ┃            ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ Total Time (HEAD)                            │ 30900.97ms │
│ Total Time (optimize-clickbench-q17-limit)   │ 30884.87ms │
│ Average Time (HEAD)                          │   312.13ms │
│ Average Time (optimize-clickbench-q17-limit) │   311.97ms │
│ Queries Faster                               │          9 │
│ Queries Slower                               │          5 │
│ Queries with No Change                       │         85 │
│ Queries with Failure                         │          0 │
└──────────────────────────────────────────────┴────────────┘

Resource Usage

tpcds — base (merge-base)

Metric Value
Wall time 155.0s
Peak memory 6.4 GiB
Avg memory 5.7 GiB
CPU user 244.5s
CPU sys 8.4s
Peak spill 0 B

tpcds — branch

Metric Value
Wall time 155.0s
Peak memory 6.4 GiB
Avg memory 5.7 GiB
CPU user 244.3s
CPU sys 8.6s
Peak spill 0 B

File an issue against this benchmark runner

@Dandandan Dandandan changed the title Optimize ClickBench q17 aggregate limit Optimize group by with limit May 4, 2026
@Dandandan Dandandan added the performance Make DataFusion faster label May 4, 2026
@coderfender
Copy link
Copy Markdown
Contributor

@Dandandan , wow !

│ QQuery 17 │     605.88 / 613.50 ±7.15 / 626.68 ms │    145.80 / 152.70 ±10.91 / 174.43 ms │ +4.02x faster │

@Dandandan
Copy link
Copy Markdown
Contributor Author

@Dandandan , wow !

│ QQuery 17 │     605.88 / 613.50 ±7.15 / 626.68 ms │    145.80 / 152.70 ±10.91 / 174.43 ms │ +4.02x faster │

Yeah this is a pretty nice find 😄

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

Labels

optimizer Optimizer rules performance Make DataFusion faster sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants