Case study
Moving analytics from PostgreSQL to ClickHouse
A client's reporting database had grown to a few hundred million event rows. Dashboards that used to load in a second now took forty, and the nightly refresh was colliding with the morning.
What got faster
Aggregations over the full event history went from tens of seconds to well under one. Columnar storage and compression also cut disk usage by roughly a factor of eight.
What got harder
- Updates and deletes are expensive; we moved to append-only tables with periodic deduplication.
- Joins between large tables need more thought than in PostgreSQL.
- The team had to learn a new set of operational habits for merges and disk space.
When not to bother
If your largest table has fewer than about fifty million rows, a well-indexed PostgreSQL with materialised views is usually enough — and one database is always easier to run than two.