Skip to content

perf: make cloning SessionState faster by sharing most state behind an Arc - #24560

Merged
Dandandan merged 2 commits into
apache:mainfrom
tschwarzinger:planner-perf-1
Aug 21, 2026
Merged

perf: make cloning SessionState faster by sharing most state behind an Arc#24560
Dandandan merged 2 commits into
apache:mainfrom
tschwarzinger:planner-perf-1

Conversation

@tschwarzinger

@tschwarzinger tschwarzinger commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

Improve planner performance. See (#20495)

The solution I came up with is a bit different to the one discussed in the issue. Instead of avoiding cloning SessionState we just make it cheap to clone it by wrapping most of the state in an Arc. Cloning is only necessary when mutating the inner session state, if we're not the sole reference (Arc::make_mut as dicussed in the issue).

I initially tried to wrap the entire SessionState in an Arc but we still need copying if we're not the only reference, as execution_props are changed for each query.

What changes are included in this PR?

  • Extract SessionStateInner out of the session state and share it behind an Arc<SessionStateInner>

Are these changes tested?

Yes with existing tests

Are there any user-facing changes?

No, except faster performance

@github-actions github-actions Bot added the core Core DataFusion crate label Aug 21, 2026
@tschwarzinger

Copy link
Copy Markdown
Contributor Author

@alamb could you start the sql_planner benchmarks? It looked promising on my machine.

@tschwarzinger tschwarzinger changed the title perf: make copying SessionState faster by sharing must state behind an Arc perf: make copying SessionState faster by sharing most state behind an Arc Aug 21, 2026
@tschwarzinger

Copy link
Copy Markdown
Contributor Author

@jonathanc-n I hope it's ok that I've submitted a PR for this even though you're assigned. Happy to hear your feedback!

@tschwarzinger tschwarzinger changed the title perf: make copying SessionState faster by sharing most state behind an Arc perf: make cloning SessionState faster by sharing most state behind an Arc Aug 21, 2026
@Dandandan

Copy link
Copy Markdown
Contributor

run benchmark sql_planner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c5370051957-1839-ht88z 6.12.85+ #1 SMP Sat Jun 27 09:31:30 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 planner-perf-1 (d6dd73f) to f1f0449 (merge-base) diff

Run configuration
run benchmark sql_planner

Results will be posted here when complete


File an issue against this benchmark runner

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.81726% with 24 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.34%. Comparing base (f1f0449) to head (d6dd73f).
⚠️ Report is 27 commits behind head on main.

Files with missing lines Patch % Lines
datafusion/core/src/execution/session_state.rs 87.81% 23 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #24560      +/-   ##
==========================================
+ Coverage   81.27%   81.34%   +0.07%     
==========================================
  Files        1116     1117       +1     
  Lines      395017   397501    +2484     
  Branches   395017   397501    +2484     
==========================================
+ Hits       321055   323363    +2308     
- Misses      55166    55223      +57     
- Partials    18796    18915     +119     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark completed (GKE) | trigger

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

Comparing planner-perf-1 (d6dd73f) to f1f0449 (merge-base) diff

Run configuration
run benchmark sql_planner
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                                                 HEAD                                   planner-perf-1
-----                                                 ----                                   --------------
logical_aggregate_with_join                           1.16    458.6±1.66µs        ? ?/sec    1.00    395.2±1.08µs        ? ?/sec
logical_correlated_subquery_exists                    1.20    283.1±1.06µs        ? ?/sec    1.00    236.6±0.53µs        ? ?/sec
logical_correlated_subquery_in                        1.19    284.9±0.81µs        ? ?/sec    1.00    238.9±0.59µs        ? ?/sec
logical_distinct_many_columns                         1.09    570.7±1.08µs        ? ?/sec    1.00    522.1±1.50µs        ? ?/sec
logical_join_4_with_agg_and_filter                    1.24    248.2±1.03µs        ? ?/sec    1.00    199.9±0.47µs        ? ?/sec
logical_join_8_with_agg_sort_limit                    1.13    417.4±1.40µs        ? ?/sec    1.00    368.1±1.47µs        ? ?/sec
logical_join_chain_16                                 1.10    677.2±3.45µs        ? ?/sec    1.00    614.9±3.04µs        ? ?/sec
logical_join_chain_4                                  1.53    120.4±0.46µs        ? ?/sec    1.00     78.8±0.25µs        ? ?/sec
logical_join_chain_8                                  1.22    247.6±1.42µs        ? ?/sec    1.00    202.5±0.86µs        ? ?/sec
logical_multiple_subqueries                           1.14    518.6±1.94µs        ? ?/sec    1.00    455.7±1.84µs        ? ?/sec
logical_nested_cte_4_levels                           1.24    260.5±1.17µs        ? ?/sec    1.00    209.2±0.59µs        ? ?/sec
logical_plan_struct_join_agg_sort                     1.43    176.6±0.99µs        ? ?/sec    1.00    123.4±0.56µs        ? ?/sec
logical_plan_tpcds_all                                1.07     93.1±0.14ms        ? ?/sec    1.00     86.7±0.24ms        ? ?/sec
logical_plan_tpch_all                                 1.21      6.5±0.01ms        ? ?/sec    1.00      5.4±0.02ms        ? ?/sec
logical_scalar_subquery                               1.20    307.0±1.53µs        ? ?/sec    1.00    256.6±1.17µs        ? ?/sec
logical_select_all_from_1000                          1.01    104.5±0.17ms        ? ?/sec    1.00    103.3±0.19ms        ? ?/sec
logical_select_one_from_700                           1.18    330.3±2.40µs        ? ?/sec    1.00    279.6±1.33µs        ? ?/sec
logical_trivial_join_high_numbered_columns            1.22    288.9±0.91µs        ? ?/sec    1.00    236.2±0.86µs        ? ?/sec
logical_trivial_join_low_numbered_columns             1.24    276.4±0.84µs        ? ?/sec    1.00    223.7±0.61µs        ? ?/sec
logical_union_4_branches                              1.12    423.8±1.20µs        ? ?/sec    1.00    377.0±0.78µs        ? ?/sec
logical_union_8_branches                              1.09    817.6±1.65µs        ? ?/sec    1.00    747.4±1.65µs        ? ?/sec
logical_wide_aggregate_100_exprs                      1.00      4.5±0.01ms        ? ?/sec    1.00      4.5±0.01ms        ? ?/sec
logical_wide_case_50_exprs                            1.03      2.4±0.00ms        ? ?/sec    1.00      2.3±0.00ms        ? ?/sec
logical_wide_filter_200_predicates                    1.05   1312.0±8.50µs        ? ?/sec    1.00  1254.3±10.45µs        ? ?/sec
logical_wide_filter_50_predicates                     1.16    391.5±2.31µs        ? ?/sec    1.00    338.7±2.82µs        ? ?/sec
optimizer_correlated_exists                           1.13    248.7±0.81µs        ? ?/sec    1.00    219.7±0.44µs        ? ?/sec
optimizer_join_4_with_agg_filter                      1.10    458.7±1.14µs        ? ?/sec    1.00    416.3±0.90µs        ? ?/sec
optimizer_join_chain_4                                1.15    180.0±0.31µs        ? ?/sec    1.00    156.8±0.22µs        ? ?/sec
optimizer_join_chain_8                                1.05    561.3±1.02µs        ? ?/sec    1.00    534.4±0.85µs        ? ?/sec
optimizer_select_all_from_1000                        1.01      6.9±0.02ms        ? ?/sec    1.00      6.8±0.01ms        ? ?/sec
optimizer_select_one_from_700                         1.15    264.2±0.61µs        ? ?/sec    1.00    228.9±0.51µs        ? ?/sec
optimizer_tpcds_all                                   1.03    310.1±0.33ms        ? ?/sec    1.00    301.6±1.10ms        ? ?/sec
optimizer_tpch_all                                    1.08     17.4±0.03ms        ? ?/sec    1.00     16.1±0.03ms        ? ?/sec
optimizer_wide_aggregate_100                          1.01      2.3±0.00ms        ? ?/sec    1.00      2.2±0.00ms        ? ?/sec
optimizer_wide_filter_200                             1.00      3.7±0.01ms        ? ?/sec    1.01      3.7±0.01ms        ? ?/sec
physical_intersection                                 1.13    602.4±1.60µs        ? ?/sec    1.00    534.2±1.60µs        ? ?/sec
physical_join_consider_sort                           1.08   1060.7±2.09µs        ? ?/sec    1.00    983.0±1.58µs        ? ?/sec
physical_join_distinct                                1.25    269.9±0.86µs        ? ?/sec    1.00    216.5±0.55µs        ? ?/sec
physical_many_self_joins                              1.05      7.8±0.02ms        ? ?/sec    1.00      7.4±0.02ms        ? ?/sec
physical_plan_clickbench_all                          1.03    129.3±0.85ms        ? ?/sec    1.00    125.6±0.52ms        ? ?/sec
physical_plan_clickbench_q1                           1.05  1388.5±10.67µs        ? ?/sec    1.00   1322.2±9.35µs        ? ?/sec
physical_plan_clickbench_q10                          1.04      2.1±0.01ms        ? ?/sec    1.00      2.0±0.01ms        ? ?/sec
physical_plan_clickbench_q11                          1.01      2.2±0.01ms        ? ?/sec    1.00      2.2±0.02ms        ? ?/sec
physical_plan_clickbench_q12                          1.03      2.3±0.03ms        ? ?/sec    1.00      2.3±0.02ms        ? ?/sec
physical_plan_clickbench_q13                          1.00      2.1±0.01ms        ? ?/sec    1.01      2.1±0.06ms        ? ?/sec
physical_plan_clickbench_q14                          1.02      2.2±0.01ms        ? ?/sec    1.00      2.2±0.03ms        ? ?/sec
physical_plan_clickbench_q15                          1.03      2.1±0.01ms        ? ?/sec    1.00      2.1±0.02ms        ? ?/sec
physical_plan_clickbench_q16                          1.03   1824.0±6.48µs        ? ?/sec    1.00  1765.2±18.66µs        ? ?/sec
physical_plan_clickbench_q17                          1.02   1876.0±7.10µs        ? ?/sec    1.00  1832.9±19.80µs        ? ?/sec
physical_plan_clickbench_q18                          1.03   1704.8±8.05µs        ? ?/sec    1.00  1651.5±10.53µs        ? ?/sec
physical_plan_clickbench_q19                          1.04      2.1±0.01ms        ? ?/sec    1.00      2.0±0.01ms        ? ?/sec
physical_plan_clickbench_q2                           1.06   1818.6±6.20µs        ? ?/sec    1.00   1714.1±6.65µs        ? ?/sec
physical_plan_clickbench_q20                          1.04   1552.8±8.40µs        ? ?/sec    1.00   1488.8±7.74µs        ? ?/sec
physical_plan_clickbench_q21                          1.03   1775.8±7.48µs        ? ?/sec    1.00  1726.9±10.77µs        ? ?/sec
physical_plan_clickbench_q22                          1.01      2.2±0.01ms        ? ?/sec    1.00      2.2±0.02ms        ? ?/sec
physical_plan_clickbench_q23                          1.02      2.4±0.01ms        ? ?/sec    1.00      2.4±0.03ms        ? ?/sec
physical_plan_clickbench_q24                          1.00      6.8±0.02ms        ? ?/sec    1.02      6.9±0.04ms        ? ?/sec
physical_plan_clickbench_q25                          1.03   1926.3±6.78µs        ? ?/sec    1.00   1873.9±9.56µs        ? ?/sec
physical_plan_clickbench_q26                          1.06   1813.3±9.54µs        ? ?/sec    1.00   1715.6±8.26µs        ? ?/sec
physical_plan_clickbench_q27                          1.01   1927.9±7.13µs        ? ?/sec    1.00  1902.9±10.52µs        ? ?/sec
physical_plan_clickbench_q28                          1.01      2.3±0.01ms        ? ?/sec    1.00      2.3±0.02ms        ? ?/sec
physical_plan_clickbench_q29                          1.01      2.5±0.01ms        ? ?/sec    1.00      2.5±0.02ms        ? ?/sec
physical_plan_clickbench_q3                           1.07   1717.9±6.64µs        ? ?/sec    1.00   1601.6±7.23µs        ? ?/sec
physical_plan_clickbench_q30                          1.00     15.5±0.07ms        ? ?/sec    1.02     15.8±0.04ms        ? ?/sec
physical_plan_clickbench_q31                          1.01      2.5±0.01ms        ? ?/sec    1.00      2.5±0.01ms        ? ?/sec
physical_plan_clickbench_q32                          1.02      2.5±0.01ms        ? ?/sec    1.00      2.5±0.02ms        ? ?/sec
physical_plan_clickbench_q33                          1.03      2.1±0.01ms        ? ?/sec    1.00      2.1±0.02ms        ? ?/sec
physical_plan_clickbench_q34                          1.04   1860.1±6.85µs        ? ?/sec    1.00  1785.5±11.08µs        ? ?/sec
physical_plan_clickbench_q35                          1.03   1855.9±6.49µs        ? ?/sec    1.00  1803.5±10.34µs        ? ?/sec
physical_plan_clickbench_q36                          1.03      2.2±0.01ms        ? ?/sec    1.00      2.1±0.01ms        ? ?/sec
physical_plan_clickbench_q37                          1.01      2.5±0.01ms        ? ?/sec    1.00      2.5±0.02ms        ? ?/sec
physical_plan_clickbench_q38                          1.01      2.6±0.01ms        ? ?/sec    1.00      2.5±0.03ms        ? ?/sec
physical_plan_clickbench_q39                          1.02      2.6±0.01ms        ? ?/sec    1.00      2.6±0.03ms        ? ?/sec
physical_plan_clickbench_q4                           1.06   1511.8±6.79µs        ? ?/sec    1.00   1423.2±6.06µs        ? ?/sec
physical_plan_clickbench_q40                          1.01      3.4±0.01ms        ? ?/sec    1.00      3.4±0.04ms        ? ?/sec
physical_plan_clickbench_q41                          1.00      2.8±0.01ms        ? ?/sec    1.00      2.8±0.03ms        ? ?/sec
physical_plan_clickbench_q42                          1.01      3.0±0.01ms        ? ?/sec    1.00      3.0±0.03ms        ? ?/sec
physical_plan_clickbench_q43                          1.02      3.2±0.01ms        ? ?/sec    1.00      3.1±0.02ms        ? ?/sec
physical_plan_clickbench_q44                          1.06   1600.4±6.40µs        ? ?/sec    1.00   1507.4±5.84µs        ? ?/sec
physical_plan_clickbench_q45                          1.06   1605.0±7.24µs        ? ?/sec    1.00   1519.4±7.12µs        ? ?/sec
physical_plan_clickbench_q46                          1.04   1922.0±7.93µs        ? ?/sec    1.00  1839.4±10.18µs        ? ?/sec
physical_plan_clickbench_q47                          1.03      2.6±0.01ms        ? ?/sec    1.00      2.5±0.01ms        ? ?/sec
physical_plan_clickbench_q48                          1.03      2.8±0.01ms        ? ?/sec    1.00      2.7±0.02ms        ? ?/sec
physical_plan_clickbench_q49                          1.01      2.8±0.01ms        ? ?/sec    1.00      2.8±0.03ms        ? ?/sec
physical_plan_clickbench_q5                           1.05   1645.5±7.34µs        ? ?/sec    1.00   1563.2±7.51µs        ? ?/sec
physical_plan_clickbench_q50                          1.02      2.7±0.01ms        ? ?/sec    1.00      2.6±0.02ms        ? ?/sec
physical_plan_clickbench_q51                          1.03      2.0±0.01ms        ? ?/sec    1.00   1966.6±9.15µs        ? ?/sec
physical_plan_clickbench_q6                           1.05   1651.7±7.38µs        ? ?/sec    1.00   1579.3±8.38µs        ? ?/sec
physical_plan_clickbench_q7                           1.05   1462.8±6.89µs        ? ?/sec    1.00  1389.4±11.02µs        ? ?/sec
physical_plan_clickbench_q8                           1.04   1959.3±7.04µs        ? ?/sec    1.00   1888.4±8.25µs        ? ?/sec
physical_plan_clickbench_q9                           1.04   1977.2±8.27µs        ? ?/sec    1.00  1908.8±14.08µs        ? ?/sec
physical_plan_struct_join_agg_sort                    1.05   1308.5±1.78µs        ? ?/sec    1.00   1240.6±1.98µs        ? ?/sec
physical_plan_tpcds_all                               1.02    722.5±3.14ms        ? ?/sec    1.00    709.0±1.39ms        ? ?/sec
physical_plan_tpch_all                                1.04     45.1±0.08ms        ? ?/sec    1.00     43.4±0.08ms        ? ?/sec
physical_plan_tpch_q1                                 1.06   1568.1±2.75µs        ? ?/sec    1.00   1484.4±3.76µs        ? ?/sec
physical_plan_tpch_q10                                1.04      2.8±0.00ms        ? ?/sec    1.00      2.7±0.00ms        ? ?/sec
physical_plan_tpch_q11                                1.04      2.3±0.00ms        ? ?/sec    1.00      2.2±0.00ms        ? ?/sec
physical_plan_tpch_q12                                1.05   1272.9±3.99µs        ? ?/sec    1.00   1208.4±1.78µs        ? ?/sec
physical_plan_tpch_q13                                1.07   1063.4±1.82µs        ? ?/sec    1.00    989.4±2.32µs        ? ?/sec
physical_plan_tpch_q14                                1.05   1402.5±3.70µs        ? ?/sec    1.00   1333.0±1.87µs        ? ?/sec
physical_plan_tpch_q16                                1.04   1619.0±2.56µs        ? ?/sec    1.00   1555.9±2.37µs        ? ?/sec
physical_plan_tpch_q17                                1.06   1657.9±2.94µs        ? ?/sec    1.00   1567.6±5.56µs        ? ?/sec
physical_plan_tpch_q18                                1.05   1992.5±3.36µs        ? ?/sec    1.00   1900.2±3.23µs        ? ?/sec
physical_plan_tpch_q19                                1.05   1894.4±3.38µs        ? ?/sec    1.00   1804.0±3.79µs        ? ?/sec
physical_plan_tpch_q2                                 1.02      3.6±0.00ms        ? ?/sec    1.00      3.6±0.00ms        ? ?/sec
physical_plan_tpch_q20                                1.04      2.1±0.00ms        ? ?/sec    1.00      2.1±0.00ms        ? ?/sec
physical_plan_tpch_q21                                1.03      2.9±0.00ms        ? ?/sec    1.00      2.8±0.01ms        ? ?/sec
physical_plan_tpch_q22                                1.05   1500.5±2.47µs        ? ?/sec    1.00   1428.8±2.66µs        ? ?/sec
physical_plan_tpch_q3                                 1.05   1886.9±4.77µs        ? ?/sec    1.00   1789.9±3.53µs        ? ?/sec
physical_plan_tpch_q4                                 1.07   1221.9±2.43µs        ? ?/sec    1.00   1142.9±2.45µs        ? ?/sec
physical_plan_tpch_q5                                 1.04      2.8±0.00ms        ? ?/sec    1.00      2.7±0.00ms        ? ?/sec
physical_plan_tpch_q6                                 1.15    629.6±1.55µs        ? ?/sec    1.00    546.1±2.01µs        ? ?/sec
physical_plan_tpch_q7                                 1.03      2.9±0.00ms        ? ?/sec    1.00      2.8±0.00ms        ? ?/sec
physical_plan_tpch_q8                                 1.03      3.9±0.00ms        ? ?/sec    1.00      3.8±0.00ms        ? ?/sec
physical_plan_tpch_q9                                 1.04      2.7±0.00ms        ? ?/sec    1.00      2.6±0.00ms        ? ?/sec
physical_select_aggregates_from_200                   1.00     15.4±0.04ms        ? ?/sec    1.00     15.5±0.03ms        ? ?/sec
physical_select_all_from_1000                         1.01    115.6±0.18ms        ? ?/sec    1.00    114.4±0.19ms        ? ?/sec
physical_select_one_from_700                          1.12    779.4±2.86µs        ? ?/sec    1.00    696.7±2.79µs        ? ?/sec
physical_sorted_union_order_by_10_int64               1.01      4.2±0.00ms        ? ?/sec    1.00      4.2±0.00ms        ? ?/sec
physical_sorted_union_order_by_10_uint64              1.01      9.1±0.02ms        ? ?/sec    1.00      9.0±0.01ms        ? ?/sec
physical_sorted_union_order_by_50_int64               1.00     95.9±0.21ms        ? ?/sec    1.00     96.0±0.22ms        ? ?/sec
physical_sorted_union_order_by_50_uint64              1.00    399.9±1.89ms        ? ?/sec    1.00    398.7±1.24ms        ? ?/sec
physical_theta_join_consider_sort                     1.08   1085.5±2.49µs        ? ?/sec    1.00   1004.2±2.14µs        ? ?/sec
physical_unnest_to_join                               1.11    636.5±1.65µs        ? ?/sec    1.00    571.4±1.70µs        ? ?/sec
physical_window_function_partition_by_12_on_values    1.09    715.1±1.12µs        ? ?/sec    1.00    653.8±3.58µs        ? ?/sec
physical_window_function_partition_by_30_on_values    1.04   1419.2±3.10µs        ? ?/sec    1.00   1359.9±2.19µs        ? ?/sec
physical_window_function_partition_by_4_on_values     1.16    439.8±2.11µs        ? ?/sec    1.00    378.5±1.75µs        ? ?/sec
physical_window_function_partition_by_7_on_values     1.12    539.7±1.20µs        ? ?/sec    1.00    480.6±1.32µs        ? ?/sec
physical_window_function_partition_by_8_on_values     1.11    579.5±1.74µs        ? ?/sec    1.00    520.6±2.13µs        ? ?/sec
with_param_values_many_columns                        1.00    431.8±2.00µs        ? ?/sec    1.01    435.1±1.80µs        ? ?/sec

Resource Usage

sql_planner — base (merge-base)

Metric Value
Wall time 2135.5s
Peak memory 134.1 MiB
Avg memory 76.7 MiB
CPU user 1890.2s
CPU sys 1.1s
Peak spill 0 B

sql_planner — branch

Metric Value
Wall time 2320.5s
Peak memory 128.8 MiB
Avg memory 66.9 MiB
CPU user 1870.1s
CPU sys 1.3s
Peak spill 0 B

File an issue against this benchmark runner

@Dandandan

Copy link
Copy Markdown
Contributor

Nice, looks like some substantial wins

@Dandandan

Copy link
Copy Markdown
Contributor

run benchmark sql_planner

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c5371664604-1842-jt2ss 6.12.85+ #1 SMP Sat Jun 27 09:31:30 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 planner-perf-1 (d6dd73f) to f1f0449 (merge-base) diff

Run configuration
run benchmark sql_planner

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)

Comparing planner-perf-1 (d6dd73f) to f1f0449 (merge-base) diff

Run configuration
run benchmark sql_planner
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                                                 HEAD                                   planner-perf-1
-----                                                 ----                                   --------------
logical_aggregate_with_join                           1.15    460.3±1.61µs        ? ?/sec    1.00    399.9±1.19µs        ? ?/sec
logical_correlated_subquery_exists                    1.21    286.8±1.12µs        ? ?/sec    1.00    237.2±0.59µs        ? ?/sec
logical_correlated_subquery_in                        1.20    288.0±0.81µs        ? ?/sec    1.00    241.0±0.64µs        ? ?/sec
logical_distinct_many_columns                         1.10    573.9±1.56µs        ? ?/sec    1.00    522.5±1.05µs        ? ?/sec
logical_join_4_with_agg_and_filter                    1.22    254.5±1.41µs        ? ?/sec    1.00    209.4±0.88µs        ? ?/sec
logical_join_8_with_agg_sort_limit                    1.14    428.4±1.44µs        ? ?/sec    1.00    377.2±1.80µs        ? ?/sec
logical_join_chain_16                                 1.11    683.4±3.12µs        ? ?/sec    1.00    618.1±4.60µs        ? ?/sec
logical_join_chain_4                                  1.57    123.9±0.50µs        ? ?/sec    1.00     79.1±0.26µs        ? ?/sec
logical_join_chain_8                                  1.24    253.5±1.28µs        ? ?/sec    1.00    204.1±0.81µs        ? ?/sec
logical_multiple_subqueries                           1.14    530.9±4.50µs        ? ?/sec    1.00    464.7±1.37µs        ? ?/sec
logical_nested_cte_4_levels                           1.25    269.9±1.31µs        ? ?/sec    1.00    215.6±0.92µs        ? ?/sec
logical_plan_struct_join_agg_sort                     1.37    183.6±1.51µs        ? ?/sec    1.00    134.4±1.27µs        ? ?/sec
logical_plan_tpcds_all                                1.06     94.3±0.33ms        ? ?/sec    1.00     88.7±0.61ms        ? ?/sec
logical_plan_tpch_all                                 1.22      6.7±0.02ms        ? ?/sec    1.00      5.5±0.01ms        ? ?/sec
logical_scalar_subquery                               1.21    313.4±1.55µs        ? ?/sec    1.00    258.9±0.80µs        ? ?/sec
logical_select_all_from_1000                          1.01    104.6±0.21ms        ? ?/sec    1.00    103.4±0.23ms        ? ?/sec
logical_select_one_from_700                           1.17    330.0±2.26µs        ? ?/sec    1.00    281.0±1.46µs        ? ?/sec
logical_trivial_join_high_numbered_columns            1.22    290.0±1.00µs        ? ?/sec    1.00    237.7±0.49µs        ? ?/sec
logical_trivial_join_low_numbered_columns             1.23    277.4±0.89µs        ? ?/sec    1.00    225.4±0.44µs        ? ?/sec
logical_union_4_branches                              1.15    432.1±4.21µs        ? ?/sec    1.00    375.0±0.99µs        ? ?/sec
logical_union_8_branches                              1.09    818.3±1.87µs        ? ?/sec    1.00    750.3±1.46µs        ? ?/sec
logical_wide_aggregate_100_exprs                      1.01      4.6±0.01ms        ? ?/sec    1.00      4.5±0.01ms        ? ?/sec
logical_wide_case_50_exprs                            1.03      2.4±0.01ms        ? ?/sec    1.00      2.3±0.00ms        ? ?/sec
logical_wide_filter_200_predicates                    1.04   1319.4±7.83µs        ? ?/sec    1.00   1270.4±8.01µs        ? ?/sec
logical_wide_filter_50_predicates                     1.15    396.7±2.57µs        ? ?/sec    1.00    344.9±2.20µs        ? ?/sec
optimizer_correlated_exists                           1.14    250.0±0.46µs        ? ?/sec    1.00    219.2±0.49µs        ? ?/sec
optimizer_join_4_with_agg_filter                      1.08    466.8±1.08µs        ? ?/sec    1.00    432.4±1.37µs        ? ?/sec
optimizer_join_chain_4                                1.14    180.9±0.32µs        ? ?/sec    1.00    158.7±0.16µs        ? ?/sec
optimizer_join_chain_8                                1.05    567.6±0.79µs        ? ?/sec    1.00    539.4±0.75µs        ? ?/sec
optimizer_select_all_from_1000                        1.02      6.9±0.02ms        ? ?/sec    1.00      6.7±0.01ms        ? ?/sec
optimizer_select_one_from_700                         1.14    263.9±1.20µs        ? ?/sec    1.00    231.0±0.75µs        ? ?/sec
optimizer_tpcds_all                                   1.02    310.8±0.35ms        ? ?/sec    1.00    303.9±0.42ms        ? ?/sec
optimizer_tpch_all                                    1.07     17.5±0.04ms        ? ?/sec    1.00     16.3±0.05ms        ? ?/sec
optimizer_wide_aggregate_100                          1.01      2.3±0.00ms        ? ?/sec    1.00      2.2±0.00ms        ? ?/sec
optimizer_wide_filter_200                             1.00      3.7±0.01ms        ? ?/sec    1.00      3.7±0.01ms        ? ?/sec
physical_intersection                                 1.14    606.5±2.48µs        ? ?/sec    1.00    533.9±2.43µs        ? ?/sec
physical_join_consider_sort                           1.09  1065.2±11.61µs        ? ?/sec    1.00    978.2±2.12µs        ? ?/sec
physical_join_distinct                                1.25    271.6±0.67µs        ? ?/sec    1.00    218.0±0.58µs        ? ?/sec
physical_many_self_joins                              1.05      7.9±0.04ms        ? ?/sec    1.00      7.5±0.03ms        ? ?/sec
physical_plan_clickbench_all                          1.11    138.5±2.05ms        ? ?/sec    1.00    124.5±0.51ms        ? ?/sec
physical_plan_clickbench_q1                           1.07  1416.5±10.50µs        ? ?/sec    1.00   1325.6±8.59µs        ? ?/sec
physical_plan_clickbench_q10                          1.10      2.2±0.05ms        ? ?/sec    1.00      2.0±0.01ms        ? ?/sec
physical_plan_clickbench_q11                          1.11      2.4±0.05ms        ? ?/sec    1.00      2.2±0.01ms        ? ?/sec
physical_plan_clickbench_q12                          1.11      2.5±0.06ms        ? ?/sec    1.00      2.2±0.01ms        ? ?/sec
physical_plan_clickbench_q13                          1.10      2.2±0.07ms        ? ?/sec    1.00   1997.1±7.36µs        ? ?/sec
physical_plan_clickbench_q14                          1.11      2.4±0.08ms        ? ?/sec    1.00      2.1±0.01ms        ? ?/sec
physical_plan_clickbench_q15                          1.10      2.3±0.09ms        ? ?/sec    1.00      2.1±0.01ms        ? ?/sec
physical_plan_clickbench_q16                          1.10  1910.4±32.04µs        ? ?/sec    1.00  1739.5±11.12µs        ? ?/sec
physical_plan_clickbench_q17                          1.10  1957.6±40.18µs        ? ?/sec    1.00   1781.4±7.92µs        ? ?/sec
physical_plan_clickbench_q18                          1.10  1791.7±27.17µs        ? ?/sec    1.00   1626.4±6.72µs        ? ?/sec
physical_plan_clickbench_q19                          1.12      2.3±0.07ms        ? ?/sec    1.00      2.0±0.03ms        ? ?/sec
physical_plan_clickbench_q2                           1.05  1799.7±10.07µs        ? ?/sec    1.00   1714.3±7.08µs        ? ?/sec
physical_plan_clickbench_q20                          1.09  1614.0±30.22µs        ? ?/sec    1.00   1477.6±7.71µs        ? ?/sec
physical_plan_clickbench_q21                          1.10  1882.2±41.84µs        ? ?/sec    1.00   1713.8±7.16µs        ? ?/sec
physical_plan_clickbench_q22                          1.10      2.3±0.04ms        ? ?/sec    1.00      2.1±0.01ms        ? ?/sec
physical_plan_clickbench_q23                          1.12      2.5±0.06ms        ? ?/sec    1.00      2.3±0.01ms        ? ?/sec
physical_plan_clickbench_q24                          1.08      7.2±0.03ms        ? ?/sec    1.00      6.6±0.05ms        ? ?/sec
physical_plan_clickbench_q25                          1.13      2.1±0.05ms        ? ?/sec    1.00   1826.1±6.87µs        ? ?/sec
physical_plan_clickbench_q26                          1.11  1856.8±32.24µs        ? ?/sec    1.00   1667.0±6.33µs        ? ?/sec
physical_plan_clickbench_q27                          1.13      2.1±0.04ms        ? ?/sec    1.00   1861.3±6.46µs        ? ?/sec
physical_plan_clickbench_q28                          1.16      2.6±0.08ms        ? ?/sec    1.00      2.3±0.01ms        ? ?/sec
physical_plan_clickbench_q29                          1.15      2.8±0.08ms        ? ?/sec    1.00      2.4±0.01ms        ? ?/sec
physical_plan_clickbench_q3                           1.05   1696.7±8.07µs        ? ?/sec    1.00   1608.9±7.58µs        ? ?/sec
physical_plan_clickbench_q30                          1.04     16.0±0.05ms        ? ?/sec    1.00     15.5±0.08ms        ? ?/sec
physical_plan_clickbench_q31                          1.13      2.7±0.06ms        ? ?/sec    1.00      2.4±0.01ms        ? ?/sec
physical_plan_clickbench_q32                          1.12      2.7±0.06ms        ? ?/sec    1.00      2.4±0.01ms        ? ?/sec
physical_plan_clickbench_q33                          1.11      2.2±0.04ms        ? ?/sec    1.00   1992.3±7.42µs        ? ?/sec
physical_plan_clickbench_q34                          1.13  1970.2±35.07µs        ? ?/sec    1.00   1745.4±6.94µs        ? ?/sec
physical_plan_clickbench_q35                          1.11  1980.1±32.49µs        ? ?/sec    1.00   1783.3±6.69µs        ? ?/sec
physical_plan_clickbench_q36                          1.13      2.3±0.05ms        ? ?/sec    1.00      2.1±0.01ms        ? ?/sec
physical_plan_clickbench_q37                          1.17      2.9±0.08ms        ? ?/sec    1.00      2.5±0.01ms        ? ?/sec
physical_plan_clickbench_q38                          1.15      2.8±0.08ms        ? ?/sec    1.00      2.5±0.01ms        ? ?/sec
physical_plan_clickbench_q39                          1.15      2.9±0.08ms        ? ?/sec    1.00      2.5±0.01ms        ? ?/sec
physical_plan_clickbench_q4                           1.06   1509.6±9.00µs        ? ?/sec    1.00   1425.0±7.09µs        ? ?/sec
physical_plan_clickbench_q40                          1.16      3.8±0.06ms        ? ?/sec    1.00      3.3±0.01ms        ? ?/sec
physical_plan_clickbench_q41                          1.15      3.2±0.06ms        ? ?/sec    1.00      2.8±0.01ms        ? ?/sec
physical_plan_clickbench_q42                          1.15      3.4±0.08ms        ? ?/sec    1.00      2.9±0.01ms        ? ?/sec
physical_plan_clickbench_q43                          1.16      3.6±0.07ms        ? ?/sec    1.00      3.1±0.01ms        ? ?/sec
physical_plan_clickbench_q44                          1.09  1666.3±17.89µs        ? ?/sec    1.00   1526.6±5.61µs        ? ?/sec
physical_plan_clickbench_q45                          1.09  1649.7±20.79µs        ? ?/sec    1.00   1511.2±7.14µs        ? ?/sec
physical_plan_clickbench_q46                          1.11      2.0±0.05ms        ? ?/sec    1.00   1819.6±8.28µs        ? ?/sec
physical_plan_clickbench_q47                          1.12      2.8±0.06ms        ? ?/sec    1.00      2.5±0.01ms        ? ?/sec
physical_plan_clickbench_q48                          1.15      3.1±0.10ms        ? ?/sec    1.00      2.7±0.01ms        ? ?/sec
physical_plan_clickbench_q49                          1.15      3.1±0.07ms        ? ?/sec    1.00      2.7±0.01ms        ? ?/sec
physical_plan_clickbench_q5                           1.06  1651.5±10.55µs        ? ?/sec    1.00   1561.4±5.75µs        ? ?/sec
physical_plan_clickbench_q50                          1.14      3.0±0.06ms        ? ?/sec    1.00      2.6±0.01ms        ? ?/sec
physical_plan_clickbench_q51                          1.11      2.2±0.05ms        ? ?/sec    1.00   1950.6±7.02µs        ? ?/sec
physical_plan_clickbench_q6                           1.06   1658.2±8.24µs        ? ?/sec    1.00   1566.5±6.55µs        ? ?/sec
physical_plan_clickbench_q7                           1.06  1477.7±17.31µs        ? ?/sec    1.00   1390.2±8.24µs        ? ?/sec
physical_plan_clickbench_q8                           1.11      2.1±0.04ms        ? ?/sec    1.00  1878.7±10.29µs        ? ?/sec
physical_plan_clickbench_q9                           1.12      2.1±0.08ms        ? ?/sec    1.00   1893.4±7.02µs        ? ?/sec
physical_plan_struct_join_agg_sort                    1.07   1339.8±2.35µs        ? ?/sec    1.00   1246.8±2.28µs        ? ?/sec
physical_plan_tpcds_all                               1.02    727.2±2.61ms        ? ?/sec    1.00    715.0±2.22ms        ? ?/sec
physical_plan_tpch_all                                1.04     45.3±0.14ms        ? ?/sec    1.00     43.4±0.10ms        ? ?/sec
physical_plan_tpch_q1                                 1.05   1583.4±3.10µs        ? ?/sec    1.00   1503.3±2.66µs        ? ?/sec
physical_plan_tpch_q10                                1.05      2.9±0.01ms        ? ?/sec    1.00      2.7±0.01ms        ? ?/sec
physical_plan_tpch_q11                                1.09      2.4±0.02ms        ? ?/sec    1.00      2.2±0.00ms        ? ?/sec
physical_plan_tpch_q12                                1.09   1297.1±6.38µs        ? ?/sec    1.00   1191.0±3.41µs        ? ?/sec
physical_plan_tpch_q13                                1.07   1070.6±3.50µs        ? ?/sec    1.00    996.8±2.70µs        ? ?/sec
physical_plan_tpch_q14                                1.09   1461.5±8.01µs        ? ?/sec    1.00   1339.1±2.48µs        ? ?/sec
physical_plan_tpch_q16                                1.06   1647.0±3.32µs        ? ?/sec    1.00   1558.3±3.60µs        ? ?/sec
physical_plan_tpch_q17                                1.07   1682.1±5.13µs        ? ?/sec    1.00   1565.2±2.45µs        ? ?/sec
physical_plan_tpch_q18                                1.03   1989.2±4.21µs        ? ?/sec    1.00  1930.6±11.52µs        ? ?/sec
physical_plan_tpch_q19                                1.06   1907.2±3.78µs        ? ?/sec    1.00   1802.7±2.95µs        ? ?/sec
physical_plan_tpch_q2                                 1.03      3.7±0.01ms        ? ?/sec    1.00      3.6±0.01ms        ? ?/sec
physical_plan_tpch_q20                                1.05      2.2±0.00ms        ? ?/sec    1.00      2.1±0.00ms        ? ?/sec
physical_plan_tpch_q21                                1.03      2.9±0.00ms        ? ?/sec    1.00      2.8±0.00ms        ? ?/sec
physical_plan_tpch_q22                                1.06   1520.7±2.21µs        ? ?/sec    1.00   1437.1±2.18µs        ? ?/sec
physical_plan_tpch_q3                                 1.06   1903.0±7.69µs        ? ?/sec    1.00   1797.7±2.45µs        ? ?/sec
physical_plan_tpch_q4                                 1.08   1229.1±4.53µs        ? ?/sec    1.00   1140.2±3.08µs        ? ?/sec
physical_plan_tpch_q5                                 1.04      2.8±0.01ms        ? ?/sec    1.00      2.7±0.00ms        ? ?/sec
physical_plan_tpch_q6                                 1.15    638.2±2.61µs        ? ?/sec    1.00    555.8±1.68µs        ? ?/sec
physical_plan_tpch_q7                                 1.03      2.9±0.00ms        ? ?/sec    1.00      2.8±0.02ms        ? ?/sec
physical_plan_tpch_q8                                 1.03      3.9±0.02ms        ? ?/sec    1.00      3.8±0.03ms        ? ?/sec
physical_plan_tpch_q9                                 1.04      2.8±0.01ms        ? ?/sec    1.00      2.6±0.02ms        ? ?/sec
physical_select_aggregates_from_200                   1.00     15.5±0.05ms        ? ?/sec    1.00     15.5±0.04ms        ? ?/sec
physical_select_all_from_1000                         1.01    115.7±0.33ms        ? ?/sec    1.00    114.5±0.22ms        ? ?/sec
physical_select_one_from_700                          1.11   788.0±15.68µs        ? ?/sec    1.00    708.0±2.18µs        ? ?/sec
physical_sorted_union_order_by_10_int64               1.02      4.2±0.01ms        ? ?/sec    1.00      4.1±0.01ms        ? ?/sec
physical_sorted_union_order_by_10_uint64              1.01      9.1±0.03ms        ? ?/sec    1.00      9.0±0.03ms        ? ?/sec
physical_sorted_union_order_by_50_int64               1.00     96.3±0.35ms        ? ?/sec    1.00     96.2±0.32ms        ? ?/sec
physical_sorted_union_order_by_50_uint64              1.00    401.6±1.20ms        ? ?/sec    1.00    402.2±1.32ms        ? ?/sec
physical_theta_join_consider_sort                     1.09  1092.1±11.99µs        ? ?/sec    1.00   1001.0±2.18µs        ? ?/sec
physical_unnest_to_join                               1.11    643.7±6.15µs        ? ?/sec    1.00    577.8±2.56µs        ? ?/sec
physical_window_function_partition_by_12_on_values    1.09    728.7±6.02µs        ? ?/sec    1.00    666.6±1.48µs        ? ?/sec
physical_window_function_partition_by_30_on_values    1.04   1422.1±2.05µs        ? ?/sec    1.00   1367.4±4.26µs        ? ?/sec
physical_window_function_partition_by_4_on_values     1.16    447.7±1.36µs        ? ?/sec    1.00    386.7±1.15µs        ? ?/sec
physical_window_function_partition_by_7_on_values     1.12    544.7±2.13µs        ? ?/sec    1.00    487.7±0.98µs        ? ?/sec
physical_window_function_partition_by_8_on_values     1.11    583.9±1.31µs        ? ?/sec    1.00    526.3±1.51µs        ? ?/sec
with_param_values_many_columns                        1.00    431.4±2.69µs        ? ?/sec    1.00    431.2±1.87µs        ? ?/sec

Resource Usage

sql_planner — base (merge-base)

Metric Value
Wall time 2130.5s
Peak memory 128.8 MiB
Avg memory 73.4 MiB
CPU user 1882.7s
CPU sys 1.4s
Peak spill 0 B

sql_planner — branch

Metric Value
Wall time 2105.5s
Peak memory 128.0 MiB
Avg memory 74.4 MiB
CPU user 1872.4s
CPU sys 1.3s
Peak spill 0 B

File an issue against this benchmark runner

@Dandandan
Dandandan added this pull request to the merge queue Aug 21, 2026
@Dandandan

Copy link
Copy Markdown
Contributor

Amazing 🚀 !

Merged via the queue into apache:main with commit db8796d Aug 21, 2026
41 checks passed
@alamb

alamb commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Thank you @tschwarzinger and @Dandandan

@alamb alamb added the performance Make DataFusion faster label Aug 21, 2026
/// [`SessionContext::state`].
///
/// [`SessionContext::state`]: crate::execution::context::SessionContext::state
execution_props: ExecutionProps,

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.

so simple, yet so elegant 🏆

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

Labels

core Core DataFusion crate performance Make DataFusion faster

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve performance of query execution by not clone'ing SessionState

5 participants