-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Is your feature request related to a problem or challenge?
DataFusion can theoretically plan queries of almost any complexity. However, for moderately complex queries, especially those involving UNIONS or deeply nested plans, it can sometimes take seconds to plan they query
At InfluxData we have had to disable certain equivalence checks because without doing so the planning time becomes exponential (and effectively locks up one of our cores)
Basically I would like to use this ticket to coordinate / start making meaningful progress reducing the planning time for DataFusion.
Describe the solution you'd like
We have fairly thorough benchmarks at this point that I think covers many use cases.
# don't forget --profile=profiling otherwise you'll end up with no symbol names
cargo bench --profile=profiling --bench sql_planner If anyone wants to help with this EPIC an excellent first step to do would be
- Contribute example queries that are slow to plan in your environment
- Spend time profiling the existing benchmarks to identify potential performance improvements
Describe alternatives you've considered
Issues reporting slow planning time
- Bad performance on wide tables (1000+ columns) due to planning overhead #7698
- Planning time for queries with many columns with union and order by is very slow #17261
Ideas to potentially increase performance
- Optimize planner to avoid excessive schema transform functions #9144
- Replace
Boxes withArcin theExprenum. #9577 - Avoid recomputing
PlanPropertiesredundently #19796
Prior Epics
- Improve Planning Time #13015
- [Epic] A collection of issues to improve planning performance / speed / efficiency #5637
Additional context
No response