/plushcap/analysis/timescale/how-we-made-real-time-data-aggregation-in-postgres-faster-by-50-000

How We Made Real-Time Data Aggregation in Postgres Faster by 50,000%

What's this blog post about?

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.

Company
Timescale

Date published
March 20, 2024

Author(s)
Fabrízio de Royes Mello

Word count
3431

Hacker News points
None found.

Language
English


By Matt Makai. 2021-2024.