← Lessons

quiz vs the machine

Platinum1720

Databases

Time Series Databases

Specialized engines for high volume timestamped measurements.

6 min read · advanced · beat Platinum to climb

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.

Check yourself

Answer to earn rating on the learn ladder.

1. Time series databases partition data primarily by:

2. Downsampling in a time series database helps by: