4 ms·
My understanding is that using SQLite is completely fine in a multithreaded architecture, but you have to ensure that the simultaneous database operations matc
by jpeeler 9y ago
My understanding is that using SQLite is completely fine in a multithreaded architecture, but you have to ensure that the simultaneous database operations match the correct threading mode:
https://sqlite.org/threadsafe.html https://sqlite.org/threadsafe.html
I also believe that the common way of gaining performance while protecting safety is to use multi-thread mode with connection pooling. The idea being that your application can use different database connections to achieve multiple writes without relying on the overhead of additional locking required within SQLite itself for serialized mode.
Would be interesting if anybody has performance metrics that backs up what I said with data converging on an optimum number of database connections.
- dijit 9y agothat's exactly the case; make sure only one thread writes, but how you feed data to that thread is up to you.