A time-series database (TSDB) is a database optimized for data points indexed by time, such as server metrics, sensor readings, or stock prices. It is built for high write rates and queries over time ranges.
Why it matters
Monitoring systems record thousands of measurements per second, mostly appended in time order and rarely changed. Time-series databases exploit that with compression, time-based partitioning, automatic retention rules, and built-in downsampling and aggregation. Examples include InfluxDB, TimescaleDB, and Prometheus storage. Uptime and response-time history is exactly this kind of data.
Example
SELECT date_trunc('hour', ts) AS hour,
avg(response_ms) AS avg_ms
FROM checks
WHERE ts > now() - interval '24 hours'
GROUP BY hour ORDER BY hour;
This averages response time per hour over the last day.
Common mistakes
- Keeping raw data forever without retention or downsampling, so storage grows without limit.
- Using high-cardinality labels, such as a unique ID per tag, which bloats indexes.
- Storing metrics in a general-purpose table with no time partitioning.
Related
Get notified when this term updates
Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.
This page is general information written by our editorial team and updated when documentation changes. Servers and providers differ, so test changes safely first. See our editorial policy and disclaimer.