The rule we wrote for ourselves
Since v0.6 the event row carries the version string of the deployment that wrote it — ver, exactly as the client reports it. So a number that moved can be read next to the version that moved it. This article is that idea, applied to ourselves.
One rule about the numbers, before we start: each version's measurement was taken in its own round, on its own fixture. Only each version's before-and-after is comparable — the sizes are not comparable across versions. (We learned that the hard way: one round measured the full tier and another the default one, and the difference between them looked like a product change.)
v0.5 — the two engines, four axes
Before anything else: DuckDB against SQLite, the same three years of history (6,227,088 page views, 1,026,291 events), the same machine.
| DuckDB | SQLite | |
|---|---|---|
| the data on disk | 372 MB | 3,086 MB |
| the summary of the last year | 145 ms | 17,452 ms |
| the summary of the last three years | 186 ms | 24,162 ms |
| the peak memory under load (20,000/s) | 214 MB | 33 MB |
DuckDB wins the disk (8×) and the latency (95–238×), and loses the memory (6.6×).. The trade is not "DuckDB is better": it is the disk and the latency against the memory — and the memory is the one the deployment promise is about.
. So the next releases are about the memory and the disk at the same time
v0.5.4 — one file per site
Until then one database file held every site's facts, so a query for one site read the row groups of every site.
| one file, all the sites | one file per site | |
|---|---|---|
| summary | 27.7 ms | 14.4 ms |
| breakdown | 4.8 ms | 0.6 ms |
| the buffer manager holds | 211 MB | 39 MB |
The speed comes from the table being per site, not from the instance being per site. one instance with every site attached is as fast as one instance per site, and it keeps one buffer manager
v0.6 — the id layout (the row is a third of its size)
Two columns were the reason, and both were ids:
| column | before | after | why |
|---|---|---|---|
| the visitor's id | 15.99 B/row | 3.41 B/row | eight bytes instead of sixteen — and the same eight bytes, so the dictionary eats them |
| the visit's id | 15.99 B/row | 0.39 B/row | a counter: the ids of an instance are a dense sequence, and the engine's difference code eats them |
The event row: 44.44 bytes → 16.26.. The same traffic on the same disk: −63%.. On a small box that is the difference between a year of history and three.
The same release brought the archive (the Parquet cold tier — the reports read it in place, and the shards carry the field ids Iceberg asks for, so it is a standard table and not a private format) and the ver column.
v0.7 — the properties come back into the row
The properties had been a table of their own: one row per property, with the key and the value in columns. v0.7 put them in the event row as three map columns (props_string · props_number · props_date) and deleted the table.
The same 100 million events, the same properties, the same machine:
| the property table | the three maps | |
|---|---|---|
| on disk (DuckDB) | 13,880,845 B | 375,063 B (−97.3%) |
| on disk (ClickHouse) | 18,849,104 B | 559,022 B (−70%) |
| the write | 9.43 s | 8.81 s |
| a report that filters by a property | 0.6 ms | 6.5 ms |
Two of the three are wins and one is a loss, and the loss is the known one: the property table was narrow, so a filter over it read two columns of a small table; over the maps it reads the map column of the fact table.
. The write is also one request instead of two
v0.8 — the vocabulary, and then the key
Three changes, all in the data's shape, all measured before they were made:
user_id→distinct_id— the site owner's own id is stored as it was sent, not as a hash of it (and Umami's name for it is accepted);country/region→region/subdivision— the geography stops making statements about what a place is; the codes are stored as the geolocation database gives them;has_propsbecomes an integer — which level the properties are at (0 none · 1 event · 2 session · 3 visit), plus aprops_maskcolumn for the site's own acceleration bits.
And then, after the release, the sort key: the cold tier's shards were written ORDER BY created_at — the arrival order — and they now carry the key that puts one visit's rows next to each other.
| before | after | |
|---|---|---|
| the Parquet shard | 19.1 B/row | 17.5 B/row (−8.5%) |
| the visits in one piece | 24.0% | 99.9% |
| our DuckDB + cold tier | 55.6 MB | 50.8 MB |
The key is the cheapest thing in a database to change, and it is worth about a tenth.. The rest of that story — including why the same key is worth 1.6% in DuckDB's own storage — is in the first chapter.
v0.9 — the door
The cold tier is a trade we made on purpose: about half the storage for queries that are two and a half times slower. The storage side is won; the query side is not.
> 「查询时间的优化 我们将在 v0.9 重点 用 索引提升」 — the owner, 2026-12-05.
. So the next version is about the reads, and the tool is indexes
And why indexes, and not something else (the owner, 2026-12-05):
> 「because the analysis demands diverge」
. Diverging means we cannot guess them in advance. and the storage must not be designed for one particular analysis — that would be freezing one query into the data. so the demands are served by indexes. an index sits beside the data; it does not change the data. the storage stays what it is, and every new way of asking gets an index
What the thread looks like
| what moved | the number | |
|---|---|---|
| v0.5 | the engine, measured | the disk 8×, the latency 95–238×, the memory 6.6× the other way |
| v0.5.4 | a file per site | the breakdown query 4.8 → 0.6 ms, the buffer manager 211 → 39 MB |
| v0.6 | the id layout | the row 44.44 → 16.26 bytes (−63%) |
| v0.7 | the properties into the row | the properties −97.3%, the write 9.43 → 8.81 s, the property filter 0.6 → 6.5 ms (the loss) |
| v0.8 | the vocabulary, then the key | the cold tier −8.5%, the instance 55.6 → 50.8 MB |
| v0.9 | the reads | open |
Every version moved one thing, and every one of them is on this list. including the loss. because a version that only lists its wins is not a measurement
Caveats
Each version's numbers were measured in its own round, on its own fixture — the sizes are not comparable across versions, only each version's before-and-after is. The tools are private; the records are in the benchmarks folder of the public repository, and the release notes of each version carry their own numbers.