Downsampling and Retention
Time series data grows without bound, so a time series database manages volume with two tools: downsampling and retention. Together they keep recent data detailed while shrinking the cost of history.
Downsampling
Downsampling replaces many fine grained points with fewer summarized points. A rule might turn one second readings into one minute averages once data is an hour old. Common summaries include:
- The average value over the window.
- The min and max to preserve spikes.
- The count or sum for totals.
You usually keep several rollups at once, so a dashboard can show seconds for the last hour and minutes for the last month.
Retention
A retention policy deletes data older than a set age, such as dropping raw points after seven days. Because data is ordered by time, the engine can drop a whole old block at once instead of hunting for scattered rows.
Key idea
Downsampling summarizes aging data into coarser points while retention deletes data past its useful age, keeping storage bounded.