Hello TimescaleDB Community,
I’m managing a database with hundreds of time series, each having millions of points. Right now the table includes time
, seriesId
, and value
columns, with continuous aggregates over 5 minutes, 15 minutes, and 1 hour.
We frequently add new series with years of historical data, which invalidates and triggers re-aggregation of basically our whole continuous aggregates due to the shared chunks with other series, even though the other series didn’t change at all. This impacts performance significantly, because most or all of the data has to be re-aggregated, even though only a very small percentage of the total data has changed.
Current Setup:
- Schema:
time
,seriesId
,value
- Continuous Aggregates: 5, 15 minutes, and 1 hour
- Issue: Adding historical data invalidates all related aggregates
We have considered restructuring our database to create a separate table for each series. However, with series being frequently added and removed through our frontend, this approach would require dynamic table creation and deletion, which might complicate our backend processes.
I am looking for advice on:
- Best practices or alternative designs in TimescaleDB to manage such data without extensive aggregate invalidation.
- Is separating series into individual tables advisable, or are there more efficient partitioning strategies?
- Any particular TimescaleDB configurations that could help optimize this setup?
Thanks for any insights or recommendations!