The four, measured
One round, one machine, the same rows (1,000,000 visits · 2,767,665 rows):
| on the disk | per view | bulk write | 100 small batches | summary | top pages | |
|---|---|---|---|---|---|---|
| our DuckDB + Parquet cold tier | 50.8 MB | 21 B | 35.1 s | 88.1 s | 114 ms | 25 ms |
| our ClickHouse | 65.7 MB | 27 B | 43.1 s | 1,025.2 s | 20 ms | 19 ms |
| our DuckDB (hot tier only) | 121.4 MB | 50 B | 20.6 s | 98.2 s | 87 ms | 10 ms |
| plausible CE (ClickHouse) | 92.3 MB | 38 B | 26.6 s | 889.5 s | 17 ms | 17 ms |
| our SQLite | 1,072.0 MB | 439 B | 4.9 s | 23.7 s | 1,714 ms | 470 ms |
| our PostgreSQL | 1,110.6 MB | 455 B | 11.0 s | 58.3 s | 1,860 ms | 295 ms |
| umami v3 (PostgreSQL) | 3,406.0 MB | 1,396 B | 87.1 s | 112.2 s | 996 ms | 1,995 ms |
Two of these are the product's line: DuckDB and ClickHouse. the other two exist because of where you already are. and the numbers say what each of those costs
The core line: DuckDB → ClickHouse, without rewriting anything
The path we mean to walk a customer along:
- DuckDB — a single file, no server to run, enough for a mid-sized site
, so 121.4 MB for a million visits, and the write path is the fastest of the column stores we have.
- ClickHouse — when the site grows, the same rows in ClickHouse cost
65.7 MB (the same order) and the reads are 5–6× faster (20 ms against 114 ms for a summary).
The migration is a change of backend, not a rewrite. because the shape is written once (the same schema, the same reports, the same numbers — the conformance tests prove it). and the cold tier's Parquet is a standard table that either engine can read
And the trade on the way up is real: ClickHouse's small-batch write is 1,025 s against DuckDB's 88 s. that is the bill for growing — and it is worth paying only when the reads are the thing that hurts
PostgreSQL: because you already have one
The reason it is there: the customer's cluster is already running. Asking somebody to run a second database because ours is nicer is a bad trade.
But the data says what it costs:
| on the disk | |
|---|---|
| our PostgreSQL backend | 1,110.6 MB |
| our DuckDB + cold tier | 50.8 MB |
| 21.9× |
That gap is the columnar advantage, and it comes from one property: append-only data.. In a row store every row carries its own overhead (header, null bitmap, alignment) and the same value repeated in a column is stored again and again. In a column store the repetition is what the compressor eats. and an event table is append-only by nature. we are not wasting anything on a general-purpose engine's flexibility — we are paying for the flexibility we do not use
. We will look at whether PostgreSQL can do better. That door is open, and nothing here says the answer is "no" — it says the answer is 21.9× today
SQLite: it came in for the metadata, and then it surprised us
The reason it is there: our management metadata lives in SQLite. That is how it got in — and then the experiments found something else:
| the write | the peak memory under load | |
|---|---|---|
| SQLite | 5.3 µs/row | 33 MB |
| DuckDB | 19.6 µs/row | 214 MB |
SQLite writes three and a half times faster and holds six times less memory. and on the full traffic: the write is 3.2–4.2× faster than DuckDB's (4,634 ms against 19,352 ms for the bulk load; 24,747 ms against 78,837 ms for the small batches). but its reads are 15× slower (summary 1,714 ms against 114 ms). which is the whole trade in two numbers
And that is where the idea came from: if the write is that good and the read is that bad, then the storage can be Parquet-ified. the history becomes Parquet (columnar, compressed, standard) and only the hot days stay in the row store. and the queries run in the columnar engine, over both
sumimi-lite, the experiment (its own article)
Write in SQLite · export the history to Parquet · query with DuckDB over both. that experiment is its own article: SQLite writes fast and uses less memory — and we still gave up the sumimi-lite plan. there are its three numbers (writes 3.2–4.2× faster · six times less memory · the history 52.9 MB read in 0.03 s), its mechanism (the export is the checkpoint) and the two reasons it was dropped
One line here: the mode did not ship, but "the storage can be solved by Parquet-ifying it" came from it — and that became the cold tier
Where each line stands
| line | why it is there | what it costs |
|---|---|---|
| DuckDB | the starting point of the core line: one file, no server, enough for a mid-sized site | the reads are 5–6× slower than ClickHouse's; the hot tier alone is 121.4 MB |
| ClickHouse | the growing end of the core line: the same rows, 65.7 MB, and reads 5–6× faster | the small-batch write is 12× slower (1,025 s against 88 s) |
| PostgreSQL | you already run one | 21.9× the storage of our DuckDB tier; the reads are 16× slower than DuckDB's |
| SQLite | our management metadata lives there — and it is the fastest writer we have | the reads are 15× slower; indexes cannot save a custom query |
What we take away
- Four backends is not a menu: two lines and two accommodations. The core
line is DuckDB → ClickHouse, and the move between them is a change of backend, not a rewrite — because the shape is written once.
- The other two exist because of where you already are, and the numbers
say what they cost: 21.9× the storage for PostgreSQL, 15× slower reads for SQLite.
- **The reason columnar wins here is not fashion — it is that event data is
append-only**, and that is exactly the shape a column store's compression eats.
- The experiment that did not ship is still worth having: SQLite's write
and memory numbers are what told us the storage could be Parquet-ified. and that became the cold tier. the hybrid was the road to it
Caveats
The four-way table is one round on one machine (the scoreboard's tier: 1,000,000 visits · 2,767,665 rows). The write measurements are from another round, and the memory numbers from a third (three years of history, 20,000/s) — each comparison is inside its own round, and the rounds are not interchangeable.
The measuring tools are private; every number here was measured on the machine above, and the method is written down in the post itself.