Company
Date Published
July 22, 2024
Author
Andres Taylor
Word count
669
Language
English
Hacker News points
None

Summary

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.