Partitions & Retention
Time partitions
Immutable tables are stored in UTC-day partitions (ts / 86_400_000). On disk:
<db>/data/t<table>/p<day>/c<channel>.seg
Partitions make three things cheap:
- range scans touch only overlapping days,
- retention = delete a directory,
- late data is no special case — it merges into whichever day it belongs to (partitions are rewritable; there is no sealing window).
Mutable tables live in a single partition — their ts is a version, not an epoch to shard by.
Retention
Declared per table, enforced by the background worker:
CREATE TABLE telemetry (speed DOUBLE) WITH (RETENTION 90 d);
Partitions older than the window are dropped whole. No row-level delete machinery exists — that is the point. Mutable tables have no retention.