Databases and storage · Comparison

PostgreSQL vs ClickHouse

PostgreSQL is built for running an app (many small reads and writes); ClickHouse is built for analysing one (a few enormous reads). Plenty of products use both.

2 options · 6 questions side by side · updated

ComparePostgreSQLClickHouse
Built forTransactions (OLTP)Analytics (OLAP)
StorageRow by rowColumn by column, compressed
Typical queryFetch or update one orderCount events per day over a year
Updates and deletesCheap and frequentExpensive, best avoided
Adding up billions of rowsSlow without extra workSeconds or less
TransactionsFull ACIDLimited

How to choose between PostgreSQL and ClickHouse

  • Keep users, orders and anything that changes in PostgreSQL.
  • Send events, logs and metrics to ClickHouse once analytics queries start slowing PostgreSQL down.

The options

More comparisons

Crafted in the dark. Shipped to the world.

Tell us what you are building. You get a private project space with a proposal and a line-by-line quote within a day.