ContextArticle
Storing revision histories in relational databases is perennially difficult, and column-per-version approaches waste enormous space on long documents.
The author sets up the problem: naive storage of a row per previous version means every edit to a large document adds another full copy to the database. ✦ AI generated
The author (as spoken to GPT-Live) · Simon Willison's Weblog · 2026-08-09 · original ↗
I've built these kinds of systems in the past, and it's always difficult to come up with a efficient way to do this. Like the easiest way is you have a row for every previous copy of the previous previous value of the string. But if it's a long document Like20 kilobytes of data, that means that every single edit adds another 20 kilobytes of data to the database, right.
Read full article ↗excerpt · fair-use quotation
Around this claim
Mechanism · 2
Bundling every version of a document into a single blob and applying a good compression algorithm should wipe out most of the redundant text.The author (as spoken to GPT-Live) · Simon Willison's Weblog · conf 80%The scheme is a BLOB history column holding a compressed JSON array of all previous documents, plus an uncompressed parallel JSON array of timestamps.The author (as spoken to GPT-Live) · Simon Willison's Weblog · conf 60%