Company
Date Published
March 20, 2024
Author
Fabrízio de Royes Mello
Word count
3431
Language
English
Hacker News points
20

Summary

In this blog post, the authors discuss how they made real-time data aggregation in Postgres faster by 50,000% using continuous aggregates (CAggs), a core feature of TimescaleDB. CAggs are self-updating materialized views optimized for aggregation queries over time-series data. The authors introduced enhancements to significantly accelerate real-time data aggregation in TimescaleDB 2.13.0, resulting in a planning time reduction of over 50,000% and a substantial decrease in query execution times. They achieved this by constifying the watermark function call, which allowed plan time chunk exclusion and scans only for the chunks that are actually accessed by the query.