Skip to content

Improve Planning Time #13015

@alamb

Description

@alamb

Is your feature request related to a problem or challenge?

Follow on to #12950

@askalt added a benchmark for planning a benchmark with several aggregates. You can run it (with flamegraph) like

Some profiling

cargo flamegraph --root --bench sql_planner -- --bench physical_select_aggregates_from_200

As can be seen from the flame graphs, a significant amount of the physical planning time is spent on creating ProjectionMapping. However, there are many other interesting places that can probably be made faster too

flamegraph
Screenshot 2024-10-19 at 6 50 15 AM
Screenshot 2024-10-19 at 6 54 00 AM
Screenshot 2024-10-19 at 6 56 02 AM

Describe the solution you'd like

It would be very nice to make this benchmark faster by optimizing these codepaths

Describe alternatives you've considered

Physical Planning could likely be made faster by optimizing EquivalenceProperty calculations. However, since it is a small part of the overall planning time maybe LogicalPlanning / SQLPlanning are better places to start

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions