Skip to main content
Version: 0.3.16

Partitions & Retention

Time partitions are automatic (below). To move a rows table's data between nodes as a portable package, see Data packages.

Time partitions

Immutable tables are stored in 4-week (28-day) time partitions. Every channel of a partition lives in one pack file. On disk:

<db>/data/t<table>/p<part>/pack.seg

The partition is wide enough that years of data stay a few hundred files, not the hundreds of thousands a one-day partition × dozens of channels would make — and a read maps one file per partition, so the open-file and memory-map counts scale with partitions, not partitions × channels. Partitions make three things cheap:

  • range scans touch only overlapping partitions,
  • retention = delete a directory,
  • late data is no special case — a fold writes it into whichever partition it belongs to as a fresh run (runs are additive, then compacted; 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.