Prompt
I'm building a metrics service with high-cardinality tags, what database is safest?
Latest observation
Oct 25, 2026
OpenAI APIWeb search: off
For a metrics service with high-cardinality tags, the “safest” choice usually depends on whether you mean:
- Safest operationally
- Safest for correctness/data loss
- Safest for handling very high cardinality without falling over
If you want the most conservative answer: use a purpose-built time-series/analytics system, not a traditional relational database as the primary store.
Good default choices
1) ClickHouse
Best general-purpose choice for high-cardinality metrics at scale.
Why it’s safe:
- Handles large tag dimensions well
- Excellent compression and query performance
- Works well for aggregations and ad hoc slicing
- Commonly used for metrics/event analytics
Tradeoffs:
- More operational complexity than a simple SQL DB
- You need to design schemas/partitions carefully
- Not ideal if you need ultra-low-latency point writes with tiny operational footprint
2) VictoriaMetrics
Best if your workload is Prometheus-like metrics.
Why it’s safe:
- Designed specifically for metrics
- Handles high cardinality better than many TSDBs
- Simpler operationally than some alternatives
- Good ingestion performance and efficient storage
Tradeoffs:
- Less flexible than ClickHouse for arbitrary analytics
- Best fit is still metrics, not general event analytics
3) TimescaleDB
Good if you want PostgreSQL compatibility.
Why it’s safe:
- Familiar SQL ecosystem
- Easier integration if your team already uses Postgres
- Useful for moderate-to-high cardinality
Tradeoffs:
- At very high cardinality, it may become harder to manage/cost more than specialized systems
- Not as strong as ClickHouse/VictoriaMetrics for extreme scale
What to avoid as the primary store
- Plain PostgreSQL/MySQL for very high-cardinality metrics at scale
They can work early on, but index bloat, write amplification, and expensive queries become problems. - Elasticsearch/OpenSearch unless your main use case is search/log-style querying
They can store metrics, but it’s usually not the safest or cheapest choice.
My practical recommendation
- If this is Prometheus-style metrics: VictoriaMetrics
- If this is metrics + heavy ad hoc analytics: ClickHouse
- If you want SQL + familiarity + moderate scale: TimescaleDB
Most “safely” in production
If you’re worried about operational safety and scalability, a strong pattern is:
- Ingest into Kafka or a buffer
- Write to ClickHouse or VictoriaMetrics
- Keep raw tags compressed/normalized
- Pre-aggregate common queries
That reduces the risk of losing data during spikes and helps manage cardinality.
If you want, I can also give you:
- a decision matrix,
- a schema design for high-cardinality tags,
- or a recommended architecture for ingestion + query.