SQLite writes fast and uses less memory — and we still gave up the sumimi-lite plan

This is the report of an experiment. **The numbers were good. We did not ship it.** And the reason it was worth running is not the mode — it is the sentence it gave us: the storage problem can be solved by Parquet-ifying it.

What the mode is

whowhat it looks like
writeSQLitethe hot days live in SQLite (a row store: fast writes, cheap transactions)
exporta batch jobthe old days leave as Parquet shards (a column store: compresses hard, reads fast, standard)
queryDuckDBone query reads both: SQLite's hot file (sqlite_scan) + the Parquet history (read_parquet)

The direction is the reverse of the obvious one.. It is not "a row engine reading a columnar file" (that road — a SQLite virtual table over Parquet — we measured and dropped). it is a columnar engine reading a row store's file

And the reason it could work at all: DuckDB's SQLite extension is already in our binary. sqlite_scanner is one of DuckDB 2.0's core extensions. nothing to install, nothing to ship, and the join is one DuckDB query

Three things we measured

① SQLite is the fastest writer of the four

The same data, the same machine (the aligned tier):

enginethe bulk load100 small batchestogether
SQLite4,634 ms24,747 ms29,381 ms
PostgreSQL10,966 ms57,480 ms68,446 ms
DuckDB19,352 ms78,837 ms98,189 ms
ClickHouse30,858 ms914,723 ms945,581 ms

SQLite writes 3.2–4.2× faster than DuckDB (4.2× on the bulk load, 3.2× on the small batches). and it holds six times less memory under load (33 MB against DuckDB's 214 MB, three years of history at 20,000/s). "push the write down as far as it goes" — SQLite already had that half

② The history half is the cheapest we have

The same 2,767,665 rows, as Parquet, read by DuckDB:

on the diskthe read
DuckDB · read_parquet52.9 MB0.03 s

Columnar for the history, vectorized for the reads — that half was never in doubt

③ The mechanism: the export is the checkpoint

This is the part worth reading twice.

Today: DuckDB is both the hot store and the query engine, so every batch pays part of a checkpoint (the WAL reaches 16 MB, checkpoint, compress the row groups), so 14–30 µs a row.

In the mode: SQLite is the hot store — the write is a WAL append, no row groups are compressed, so 5.7 µs a row — and exporting to Parquet is the checkpoint (the rows are compressed into columnar, append-only shards). and it is a batch job, not on the write path. so the write path never pays the checkpoint's cost at all.

The two accounts line up: the write path 30 µs/row → 5.7 µs/row; the checkpoint moves into a batch job at 3.8 µs/row (measured: sealing 2,767,665 rows into the cold tier took 10.4 s). both roads together are cheaper than today's 30 µs/row

And there is a second consequence, which is the deeper one: the shards are Parquet — real storage, 52.9 MB for 2.77M rows. so the hot copy is temporary. which is what "Parquet as the core storage" means: the space the hot data takes is temporary, so the write can compress less

And the reads have one path: DuckDB reads both sides in one query. the reports run on one engine from end to end

And the knobs on DuckDB's side

µs/rowwhat else
DuckDB today19.6every batch pays part of a checkpoint
DuckDB with the WAL's knobs turned14.427% faster, and 8% smaller on the disk
DuckDB with compression off19.4the write time does not change at all — and the file is 7.6× bigger
SQLite5.3the write is just a WAL append

Compression is not that account. and the knobs only buy 27%. SQLite is still 2.7× faster. to get faster you have to move the checkpoint off the write path — which is exactly what the export is

Why we gave it up

The owner's own words (2026-12-02):

> 「写 duckdb 的优势是,可以实时联查,而且热数据对磁盘写入量小。」 > > 「写 sqlite 也可以付出不少代价做实时联查;应该写文件是一个量级。」 > > 「写内存是快,但是不可能 hold 太多,hold 少了放 parquet, parquet 碎片化。」

DuckDB today is a good balance — not necessarily the best one, and there may be a better scenario for something else. writing to SQLite is the only option that competes, but the engineering, and the constant exporting to Parquet that it needs, are not small — and in a multi-tenant deployment it may not be the right shape. and the timings are built on "a lot of data arriving in a short time", which the real data flow may not look like. so the hybrid mode is not what we ship

And the six questions that had to be answered before starting it:

questionwhy it matters
①how long does the hot copy stay?the smaller it is, the faster DuckDB scans it — but the more often the export runs
②how does the export job run? (how often · which days · is it the same sealing we already have)the export is "turn the old days into Parquet" — the same job as the cold tier's, only the output differs
③how do the two sides join? (the boundary in time)the reports must not have a seam between the newest in SQLite and the oldest in Parquet
④how much does sqlite_scan push down?it decides the cost of the join: a full scan of the hot file, or only the columns we need
⑤does the write side need another engine?SQLite writes fast but it is a single writer — fine for one collector, not for many
⑥what is this to what we have now?it replaces "one DuckDB hot file + the cold tier's Parquet" with "SQLite hot + Parquet history", so DuckDB steps down from being the storage to being the query engine

And the two problems that decided it (the owner, 2026-12-05):

  1. The checkpoint choice matters a lot.. Every knob on DuckDB's side

buys 27% at most. and the export frequency, the hot copy's size and the sealing's cost all have to line up. it is a design with several dials, and each one is a decision

  1. **SQLite's shortcomings are too obvious for hot data and for custom

queries.. Its reads are 15× slower (a summary: 1,714 ms against DuckDB's 114 ms). and that is not fixable with a knob: indexes cover the regular queries, but a custom query is very hard to accelerate with indexes. and reports are custom queries (any combination of filters and groupings). which is the bill for the assumption that we cannot know what people will ask**

What it was worth, then

The mode did not ship. The idea did.

The experiment is where the sentence came from: the storage problem can be solved by Parquet-ifying it. the hot copy is temporary, the history is Parquet, and the queries run in the columnar engine. that is the cold tier. the hybrid was the road to it

And the SQLite line stayed in the product for the thing it was actually good at: our management metadata. plus the observation that it is the fastest writer we have — which is a fact worth knowing, whatever we build on it

Caveats

The write numbers are one round on one machine (the aligned tier); the memory numbers are another (three years of history, 20,000/s); the export cost is a third (sealing 2,767,665 rows in 10.4 s). Each comparison is inside its own round.

The measuring tools are private; every number here was measured on the machine above, and the method is written down in the post itself.

Sumimi / 数咪咪 is an independent open-source project. It is an open-source alternative to Umami and implements the Umami v2 HTTP API; no Umami assets are used. Licensed under the Apache-2.0 licence. Third-party names are referenced nominatively.