Skip to content

ClickHouse

ClickHouse is Watasu’s analytical database. Reach for it when you have lots of append-only data and you want to slice and aggregate it fast.

Don’t use it as a replacement for PostgreSQL — it’s not built for OLTP workloads and you’ll hate it for that.

  • product analytics events
  • audit logs at scale
  • time-series data
  • dashboards over millions or billions of rows
  • exploratory analytics where wide aggregations need to return in seconds
Terminal window
watasu addons:create clickhouse --app my-app

After attachment, your app receives ClickHouse connection details as config vars. Use any standard ClickHouse client library.

Terminal window
watasu clickhouse:cli --app my-app

ClickHouse supports manual backups, scheduled backups on supported plans, and restore from managed backups or uploaded archives.

Terminal window
watasu addons:backups:capture analytics-db
Terminal window
watasu addons:restore analytics-db ./warehouse-backup.zip --name analytics-db-restored
watasu addons:promote analytics-db-restored

See Backups and Restores for the full workflow.

  • Keep ClickHouse separate from your transactional database. Mixing dashboards and OLTP on one engine ends badly for both.
  • Validate your restore process before you need it. ClickHouse archives can be large and surprises during an incident are expensive.
  • Pre-aggregate where possible — ClickHouse loves materialized views.