# Retention and rollups

> Seven days of five-minute snapshots, ninety of hourly ones, then daily ones for good.

Source: https://boring-observability.dev/sailfish/docs/retention
Section: Using Sailfish — Sailfish documentation
Updated: 2026-10-02

---

A snapshot every five minutes is 288 a day. `sailfish:rollup` runs daily at 03:00 and keeps that from growing with every collection:

| Granularity | Kept for | Then |
| --- | --- | --- |
| Raw (every five minutes) | 7 days | Merged to one per hour |
| Hourly | 90 days | Merged to one per day |
| Daily | For good |  |

## How snapshots are merged

An hour's snapshots are merged into the last of them. Counters add up, the digest quantiles (`p95_us`, `p99_us`) and the server's gauges keep their highest value, and the merged snapshot covers the seconds of all of them. Daily table sizes are kept as they are.

Charts and detectors read a window the same way whatever its granularity, as what moved over the seconds covered. A chart reaching back into daily snapshots draws daily buckets. Re-running the rollup is safe: nothing is counted twice.

## Dropped tables and old digests

Dropped tables and indexes are kept, history and all, so you can still see what an index was doing the week before someone dropped it. Statement digests not seen in 90 days are deleted with their samples. One that runs again later starts over with a baseline.

## Changing the windows

```php
// config/sailfish.php
'retention' => [
    'raw_days' => 7,
    'hourly_days' => 90,
    'digest_days' => 90,
],
```

Set any of them to `null` to keep that granularity, or those digests, forever. The rollup's time is `SAILFISH_ROLLUP_AT`.
