
TimescaleDB Continuous Aggregates: Real-Time vs Materialized-Only
TimescaleDB Continuous Aggregates: Real-Time vs Materialized-Only Every time-series dashboard eventually hits the same wall: the aggregation query that was fast at 1 million rows takes seconds at 100 million rows, and your users are staring at a loading spinner. Pre-computing aggregations is the obvious solution, but maintaining materialized views manually is brittle -- you end up with stale data, missed refreshes, and a growing pile of custom refresh scripts. TimescaleDB continuous aggregates solve this by automating the materialization lifecycle. But they come with a subtlety that catches most people: the refresh policy intentionally leaves a gap in the materialized data, and there are two different modes for how that gap is handled. Choosing the wrong mode -- or not understanding which one you are running -- leads to dashboards that silently show stale data. What Continuous Aggregates Are A continuous aggregate (CAGG) is a materialized view backed by its own hidden hypertable. Times
Continue reading on Dev.to
Opens in a new tab




