A Workload With Structure
Metrics, sensor readings, and logs share a shape: each point has a timestamp, a set of tags, and a value. A time series database is tuned for this, ingesting millions of points per second and answering range queries over time windows.
Why Generic Tables Struggle
- The data is append mostly, with writes always at the newest time.
- Queries almost always filter by a time range and group into buckets.
- Old data is rarely updated but often aged out or downsampled.
Specialized Tricks
- Partitioning by time into chunks makes recent data fast and old data droppable.
- Storing each series columnar with delta encoding compresses timestamps tightly.
- Built in downsampling keeps coarse history while shrinking storage.
- Retention policies automatically expire data past a cutoff.
Key idea
A time series database optimizes append heavy timestamped data with time partitioning, delta compression, downsampling, and retention so range queries over windows stay fast and cheap.