11 ms·
':memory:' https://sqlite.org/inmemorydb.html https://sqlite.org/inmemorydb.html
by smitty1e 4mo ago
':memory:'
https://sqlite.org/inmemorydb.html https://sqlite.org/inmemorydb.html
- KPGv2 4mo agoExcept this source code is not using :memory: The linked source code has (defonce db (d/init-db! "db/db.db" {:pool-size 4 :pragma {:synchronous "FULL"}})) That's writing to disk.
- andersmurphy 4mo agoYes it's writing to disk (on a M1 mac which has terribly slow fsync). But, because of the transaction the fsync dance is done once per batch. Each row is the id + a 50 byte data blob. There's only one index so there's no real write amplification. The numbers will go down as you add more data and indexes.