Company
Date Published
Author
Anais Dotis-Georgiou
Word count
442
Language
English
Hacker News points
None

Summary

The InfluxDB team has introduced new optimizations to the aggregateWindow() function to improve its performance, particularly for users querying large amounts of data or having high cardinality data. These changes enable grouping like series together before calculating aggregates and allow pushdown patterns to be used more efficiently, resulting in improved query performance. The updated function is now implemented in native Go for specific functions, such as mean, sum, count, and min aggregation, making it even more performant for these use cases. To maximize the benefits of the aggregateWindow() function, users should ensure that the createEmpty option is set to false. The performance improvements have been demonstrated through testing against 50,000 points with a cardinality of 50, resulting in a significant reduction in execution time from ~508 ms to ~200 ms for a specific query pattern.