Optimizing aggregation in the Vitess query planner
The Vitess query planner has been optimized to handle aggregation better after a recent bug report. The initial problem was with a query causing VTGate to fetch large amounts of data, sometimes leading to an Out Of Memory (OOM) error. The solution involved delaying the "ordering under aggregation" rewriter until the "split aggregation" phase, allowing for efficient tree rewriting and pushing down aggregation under the join. This optimization significantly improves query performance and resource utilization by efficiently planning queries and pushing operations closer to the data.
Company
PlanetScale
Date published
July 22, 2024
Author(s)
Andres Taylor
Word count
669
Language
English
Hacker News points
None found.