IoT Bricks Blog Try challenge Sign in

Why a plain table is not enough for sensor data

You can store readings in an ordinary SQL table, and for a prototype that is fine. Then the fleet grows, and the shape of the data starts to matter.

The shape of time-series data

What a time-series database does with that

Partitions by time. Data is split into chunks by time range. Writing "now" touches the newest chunk only, and a query for the last hour never reads last year.

Makes retention cheap. Dropping data older than ninety days means dropping whole old chunks, not running a huge DELETE that rewrites the table.

Downsamples. You rarely need one reading per second forever. A common policy is to keep raw data for a week, and keep one-minute or one-hour aggregates for years.

Compresses. Consecutive readings from one sensor are similar, so storing the differences compresses very well.

Answers time questions directly. Bucketing by interval (every 5 minutes, per device) is a first-class operation, not a hand-written GROUP BY.

You do not need a product to learn this

Products such as TimescaleDB, InfluxDB or Prometheus implement these ideas at scale. The ideas themselves are small: an append-only log, a time index, chunks you can drop, and aggregate queries over a window. In this course you will build the core of one, so that when you later choose a product you know what you are paying for.

When a plain table is enough

If you have a few devices and a few weeks of data, use the table you already have. The signs that you have outgrown it are slow window queries, a table that is painful to purge, and storage that grows faster than the value of the data.