3 ms·
What I found to be the biggest problem with SQLite is concurrent write operations. WAL helps for concurrent read but not for concurrent write. On a moderate us
by Labo333 5y ago
What I found to be the biggest problem with SQLite is concurrent write operations. WAL helps for concurrent read but not for concurrent write.
On a moderate use case (< 20 write operations per s) I kept getting timeouts so I first devised a quick fix system using RQ jobs passing writes to a single process and migrated to postgres as fast as I could.
Does this software help with concurrent write operations?
- ConnorLeet 5y agoSQLite does have a branch that solves the concurrent write issue - not sure if this dqlite uses it https://sqlite.org/src/doc/754ad35c/README-server-edition.html https://sqlite.org/src/doc/754ad35c/README-server-edition.ht...
- bob1029 5y agoI have no problem with concurrent writes and wal mode on a recent build of SQLite. Perhaps you are standing up a new sqlite connection per operation or otherwise sharing between separate processes? With exclusive access using a single connection in WAL mode, I can insert tens of thousands of rows per second on flash storage no problem. Something that is not widely announced is the fact that SQLite serializes all writes by default, so you should share the same connection instance as often as possible.