Tag

#sqlite

Databases

DuckDB vs SQLite: same question, two shapes of file (and when to use which)

DuckDB and SQLite are both one-file databases that live inside your program, but SQLite stores rows in B-tree pages and DuckDB stores compressed columns in row groups of 122,880 rows. In ClickBench's published results a sum over 100 million rows takes SQLite 405 seconds and DuckDB 0.061; in a 2022 paper co-written by SQLite's own developers, SQLite ran small transactions 10 to 500 times faster. Storage, concurrency, file size, Python, DuckDB's SQLite extension, and a decision card.