The principle
DuckDB's timestamps are bit-packed, and the width of a segment is the range inside it — not the jitter, and not the precision of the values.
So truncating the values buys nothing: a value that is already millisecond-precise does not narrow the range. Changing the unit does: microseconds to milliseconds is a thousand-fold smaller interval, and it takes ten whole bits off the width.
The number
| the column | the shape | bytes a row | the bits |
|---|---|---|---|
created_at | TIMESTAMP (microseconds) | 3.98 | 31.8 |
created_at | TIMESTAMP_MS | 2.65 | 21.2 |
created_at | TIMESTAMP, values truncated to ms | 3.98 | 31.8 |
session_start | TIMESTAMP (microseconds) | 4.74 | 37.9 |
session_start | TIMESTAMP_MS | 3.13 | 25.0 |
On the whole instance that is −9.2% on the disk, with the query times unchanged.
And the other half
The per-column compression knobs are not a lever: we tried them on all 51 columns we could measure, and the engine's own choice won every one of them — on a string column it was 8× smaller than the only alternative we were allowed to write.
The experiment report has the whole table, including the methods the engine refuses to write.