3 ms·
I love SQLite but it's really a pain to do concurrent writes from multiple long-lived threads. Even in WAL mode, having multiple writers leads to tons of "datab
by nikisweeting 6y ago
I love SQLite but it's really a pain to do concurrent writes from multiple long-lived threads. Even in WAL mode, having multiple writers leads to tons of "database locked" errors and applications fall over. The writes don't even have to be complicated, single-row atomic updates with no table locking, and SQLite is not able to serialize them and handle them gracefully without triggering errors, that's up to the application.
The extra work of having to manually implement inter-thread coordination to prevent hitting the DB at the same time is a lot of work that never gets mentioned. When people talk about SQLite being able to handle tens of thousands of writes per second, there's a big asterisk, that's only if the application takes care of not making them write at the same time.