Prompt
What should I use for metrics storage if I need SQL?
Latest observation
Oct 25, 2026
OpenAI APIWeb search: off
If you need SQL, the best choice depends on how much data you’re storing and how fast you need to query it:
Good SQL-based options for metrics storage
-
PostgreSQL — best default choice for most cases
- Great SQL support, flexible, reliable
- Works well for moderate metrics volumes
- Can be improved with partitioning, indexes, TimescaleDB
-
TimescaleDB — best if your metrics are time-series data
- Built on PostgreSQL, so you still get SQL
- Designed for high-ingest metrics, retention policies, compression
- Very strong option for monitoring/observability metrics
-
ClickHouse — if you need very fast analytics on large metrics sets
- SQL interface
- Excellent for aggregations over huge volumes
- Less “traditional OLTP SQL,” but great for metrics and dashboards
-
MySQL/MariaDB — workable, but usually not my first pick for metrics
- Fine for smaller systems
- Less ideal than Postgres/Timescale for time-series patterns
Practical recommendation
- Small to medium scale: PostgreSQL
- Time-series metrics at scale: TimescaleDB
- Very large analytical workloads: ClickHouse
Rule of thumb
If your metrics are like:
timestamp, host, service, value, labelsthen TimescaleDB is often the sweet spot because it gives you SQL + time-series features.
If you want, I can also recommend based on:
- your expected ingest rate,
- retention period,
- and query patterns (dashboards, alerts, ad hoc analysis).