Omega359 commented on issue #17261:
URL: https://github.com/apache/datafusion/issues/17261#issuecomment-3769342137
I ran samply last night against a slightly modified sql_planner_extended
benchmark which had some interesting results.
```Rust
fn criterion_benchmark(c: &mut Criterion) {
env_logger::builder().is_test(true).try_init().unwrap();
let mut session_config = SessionConfig::new();
session_config.options_mut().optimizer.top_down_join_key_reordering =
true;
session_config.options_mut().optimizer.enable_dynamic_filter_pushdown =
false;
let ctx = SessionContext::new_with_config(session_config);
let rt = Runtime::new().unwrap();
// validate logical plan optimize performance
// https://github.com/apache/datafusion/issues/17261
let df = build_test_data_frame(&ctx, &rt);
c.bench_function("logical_plan_optimize", |b| {
b.iter(|| {
let df_clone = df.clone();
black_box(rt.block_on(async { let _ =
df_clone.create_physical_plan().await; }));
})
});
}
```
```
Benchmarking logical_plan_optimize: Warming up for 3.0000 s
Warning: Unable to complete 100 samples in 5.0s. You may wish to increase
target time to 20397.1s, or reduce sample count to 10.
logical_plan_optimize time: [198.72 s 199.08 s 199.48 s]
change: [+11.006% +12.045% +12.717%] (p = 0.00 <
0.05)
Performance has regressed.
Found 6 outliers among 100 measurements (6.00%)
2 (2.00%) high mild
4 (4.00%) high severe
Lost 391 events.
Local server listening at http://127.0.0.1:3000
Press Ctrl+C to stop.
```
<img width="2174" height="1830" alt="Image"
src="https://github.com/user-attachments/assets/925c17cf-8c0a-41d4-895e-7e71b1eab995"
/>
I'm going to add logging for timings per optimizer shortly and retest.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]