Open desmondcheongzx opened 3 days ago
Comparing desmondcheongzx:lift-stats-to-logical-plan
(849083a) with main
(3394a66)
⚡ 3
improvements
❌ 3
regressions
✅ 11
untouched benchmarks
:warning: Please fix the performance issues or acknowledge them on CodSpeed.
Benchmark | main |
desmondcheongzx:lift-stats-to-logical-plan |
Change | |
---|---|---|---|---|
⚡ | test_count[1 Small File] |
3.8 ms | 3.4 ms | +13.14% |
❌ | test_explain[100 Small Files] |
7.2 ms | 10 ms | -28.2% |
❌ | test_show[100 Small Files] |
15.9 ms | 26.6 ms | -40.27% |
⚡ | test_tpch[1-in-memory-native-5] |
376.3 ms | 312 ms | +20.6% |
⚡ | test_tpch[1-in-memory-native-8] |
339.2 ms | 156.9 ms | ×2.2 |
❌ | test_tpch[1-in-memory-native-9] |
362.9 ms | 451.6 ms | -19.64% |
@desmondcheongzx is this PR ready for review? it looks like a test is currently failing. Also is there any specific part you'd like me (and others) to take a look at?
@kevinzwang yeah it's ready now 😅 Apparently there was one last issue hiding with the interaction between materializing stats and generator scans.
I think this is a good breakdown for parts to look at:
src/daft-logical-plan/src/ops/source.rs
EnrichWithStats
optimizer rule to materialize stats
This PR lifts statistics into optimized logical plans so that they're available for local execution plans. It then uses these newly available statistics to make better decisions on whether to build the probe table of a hash join on the left or right side.
Benchmark results
For TPC-H, this gives us some notable speedups with Q5, Q8, and Q19.
Crucially, with this change, our native runner is now faster (or within some small deviation) than our previous python runner for all 22 TPC-H queries.
For more detailed results, we have:
Q5
Before
After
Q8
Before
After
Q19
Before
After