3 · IN PROGRESS · SOLUTION
ClickHouse or Not: A decision table
THE ISSUE OF DATA AND REQUESTS
ANSWER
WHERE
Is the data being updated and remains almost unchanged?
yes
ClickHouse
Do the queries aggregate millions of rows across multiple columns?
yes
ClickHouse
Is a data delay of a few seconds or minutes acceptable?
yes
ClickHouse
yes
PostgreSQL
Do you need a transaction that spans multiple rows?
Are FK, UNIQUE, and CHECK necessary as a safeguard?
yes
PostgreSQL
Frequent UPDATE statements on individual rows: status, balance?
yes
PostgreSQL
Should the report reflect the change immediately after COMMIT?
yes
PostgreSQL
Reading a single row by key in milliseconds under load?
yes
PostgreSQL / Redis
Do the volume and queries fit within PostgreSQL's limits?
yes
stay with PostgreSQL
ClickHouse is not a replacement for PostgreSQL. It is a secondary data store for events and aggregates. Money, inventory, and player status remain in the source of truth.