Prompt
Do I need a time-series database for metrics, or is PostgreSQL enough?
Latest observation
Oct 25, 2026
OpenAI APIWeb search: off
PostgreSQL is often enough for metrics if your scale and query patterns are modest. You usually only need a dedicated time-series database when your metrics volume, retention, or dashboard/query performance starts to outgrow what Postgres handles comfortably.
PostgreSQL is enough when:
- You have low to moderate ingest volume
- You mostly do simple aggregations like average, min/max, count over time
- Retention is relatively short or manageable
- You’re okay with using:
- partitioning by time
- indexes on timestamp + key dimensions
- scheduled rollups/downsampling
- retention jobs to delete old data
Common setups:
metrics(timestamp, metric_name, value, tags...)- time-based partitions daily/weekly
- materialized views or summary tables for dashboards
A time-series DB helps when:
- You ingest very high write rates continuously
- You need fast queries over huge time ranges
- You need built-in:
- compression
- automatic retention
- downsampling
- time-series-specific indexing
- high-cardinality handling
- You’re doing lots of operational monitoring, observability, or IoT-scale data
Examples:
- Prometheus / Mimir / Thanos for monitoring metrics
- TimescaleDB if you want Postgres-like SQL but better time-series features
- InfluxDB, QuestDB, VictoriaMetrics depending on use case
Rule of thumb
Choose PostgreSQL if:
- you’re early-stage or mid-scale
- you want one database to operate
- you value simplicity and SQL over specialized features
Choose a time-series DB if:
- metrics are a core product concern
- you expect heavy ingest and long retention
- you already know you need specialized performance/features
Practical recommendation
Start with PostgreSQL unless you already know:
- ingest will be very high
- retention will be long
- dashboards will query massive ranges frequently
A lot of teams successfully run metrics in Postgres for quite a while, especially with partitions and rollups.
If you want, I can help you decide based on your expected:
- events per second
- retention period
- query patterns
- number of metrics/tags