This is the story of what the storage engine buys, measured on the same rows, on the same machine, in one round.
The setup
One dataset: three sites, 45 days, 1,000,000 visits, 2,767,665 event rows, 56 columns. Four engines, the same rows, the same machine, one round:
| 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 |
All four engines answer the same questions with the same numbers: 846,147 page views, 284,908 visitors, 347,013 visits. That is the part that makes the sizes comparable — same rows, same answers, so only the storage differs.
The two numbers that matter
Against umami: 67 times smaller. 3,406.0 MB against 50.8 MB.
Against our own PostgreSQL backend: 22 times smaller. 1,110.6 MB against 50.8 MB — and our PostgreSQL backend is our code, on our schema, with the same reports.
The 22× is the more interesting one. umami is somebody else's product; we are not going to out-engineer them. But our own PostgreSQL backend — the same rows, the same schema, the same report code — is 22× bigger than our DuckDB. That gap is not about the market. It is about the engine, and it is ours to close.
Why PostgreSQL is 455 bytes a row
Because PostgreSQL is a row store that we are using as a column store — and it stores rows the way rows are stored, one heap page at a time.
Three things follow, and all three show up in the numbers:
- Every row carries its own overhead. A tuple has a header, a null bitmap
and an alignment; there is no per-column dictionary and no per-column compression. The same value repeated in a column is stored again and again.
- The wide columns are stored as they are. Our event row has a page
title, a referrer path, a user agent, three map columns for the properties. In a row store those are inline, and the page fills with them.
- Nothing groups the rows. There is no column segment that can hold
"the same string, forty thousand times" — there is a heap page that holds "one row, in order".
The number that shows it best is the same one the release notes quote for our own id columns: a UUID is 16 bytes and does not compress; a counter is 1 byte and does. In DuckDB the counter was 0.39 bytes a row. In PostgreSQL the id is 16 bytes of UUID in a heap tuple — a thousand times the bytes for the same information.
What each side is good at
| bulk write | small batches | summary | top pages | |
|---|---|---|---|---|
| our PostgreSQL | 11.0 s | 58.3 s | 1,860 ms | 295 ms |
| our SQLite | 4.9 s | 23.7 s | 1,714 ms | 470 ms |
| our DuckDB + cold tier | 35.1 s | 88.1 s | 114 ms | 25 ms |
| umami v3 | 87.1 s | 112.2 s | 996 ms | 1,995 ms |
PostgreSQL writes faster than DuckDB (11.0 s against 20.6 s for the bulk load — the 35.1 s is that plus sealing the cold tier). because it is a server with a write-ahead log and DuckDB is an embedded engine that rewrites its file. and it reads 16× slower (1,860 ms against 114 ms for the summary). because those numbers are scans over a row store.
That is the trade in one line: a row store writes your rows and reads them one at a time; a column store reads them in columns and writes them in batches.. For an analytics product — where the write is small and rare, and the read is wide and often — the second one wins
Where umami's extra 3× goes
Our PostgreSQL backend is 1,110.6 MB; umami's is 3,406.0 MB. Three times the same rows, in the same kind of database. The difference is in the shape:
- umami keeps the properties in their own table (one row per property, with the key and the value in columns) — v0.6 of ours did that too, and v0.7 moved them into the event row as three map columns;
- umami keeps the sessions in their own table, with the session's own fields, and the events point at it;
- ours keeps one row per event and derives the sessions from it.
. The properties are the big one: in v0.6 our own property table measured 13.9 MB against 375 KB for the same properties in three map columns (−97.3%). Umami's shape is the expensive one, and we already know the way out of it
What we take away
- The engine is worth more than the tuning. The same product, the same
rows, the same reports: 22× on the disk between our own PostgreSQL backend and our own DuckDB one.
- A row store used as a column store pays for it twice — once in the
per-row overhead, once in the scans.
- The shape of the data matters more than the shape of the engine. Umami
is 3× bigger than our PostgreSQL backend in PostgreSQL, and the reason is the property table — which we have already learned to do differently.
- PostgreSQL's write advantage is real (11.0 s against 35.1 s) **and it is
the wrong advantage for this product**: 16× slower reads is what a dashboard feels.
Caveats
Our numbers, one round, one machine (macOS/arm64): 1,000,000 visits, 2,767,665 rows, 56 columns. The DuckDB figure includes the Parquet cold tier; without it the hot tier alone is 121.4 MB (50 B per view) — still 9× smaller than our PostgreSQL backend. The measuring tools are private; every number here was measured on the machine above.