Prompt
I'm building a system for high-cardinality metrics, what database should I start with?
Latest observation
Oct 25, 2026
OpenAI APIWeb search: off
If you’re starting a high-cardinality metrics system, the best database depends on whether you want to optimize for operational simplicity, query flexibility, or massive scale. If you want a practical default:
Good starting points
1. ClickHouse
Best overall choice for many teams.
Why start here:
- Excellent for time-series analytics and aggregations
- Handles high cardinality well compared to many relational databases
- Very fast on large scans and rollups
- Mature ecosystem, easy to self-host or use managed
- Good fit for metrics, logs, and observability-style workloads
Watch out for:
- You need to model data carefully
- Not ideal for heavy point updates/deletes
- Requires some operational understanding of partitions, ordering keys, and compression
2. Prometheus / Mimir / VictoriaMetrics if this is purely metrics
If your workload is mostly Prometheus-style time series, then a purpose-built TSDB is often better.
- Prometheus: great for single-node or short retention
- Grafana Mimir: strong for scalable multi-tenant metrics
- VictoriaMetrics: simpler ops, very efficient, strong for high cardinality
Best when:
- You’re ingesting metric samples with labels
- Query patterns are mostly time-series aggregations
- You want PromQL compatibility
3. TimescaleDB if you want SQL + Postgres
Good if you want to stay in the PostgreSQL ecosystem.
Pros:
- Familiar SQL
- Easier app integration if you already use Postgres
- Good for moderate-to-high scale time-series
Cons:
- High-cardinality at very large scale can become painful compared to ClickHouse or dedicated TSDBs
My practical recommendation
- If you’re building a metrics backend from scratch and care about high cardinality: start with ClickHouse
- If you specifically need PromQL / Prometheus ecosystem compatibility: start with VictoriaMetrics or Mimir
- If you want SQL and already run Postgres: start with TimescaleDB
A simple rule of thumb
- Metrics only, Prometheus-like: VictoriaMetrics
- Analytics + ad hoc querying + metrics/logs: ClickHouse
- Need relational SQL integration: TimescaleDB
What I’d avoid as the primary store
- Plain PostgreSQL for very high cardinality and large ingest rates
- MongoDB / generic document stores for time-series metrics
- Elasticsearch as the main metrics store unless you already need search-heavy use cases
If you tell me:
- expected ingest rate,
- retention period,
- query patterns,
- whether you need PromQL,
I can recommend a much more specific choice and schema.