ok thanks. So looks like I'm going to try WAL mode with one connection to the database per thread and accessing the database using SQLITE_OPEN_NOMUTEX., no shared-cache mode, no pragma read_uncommitted. Thanks for the advice.
On 20 January 2018 at 19:49, Dan Kennedy <[email protected]> wrote: > On 01/19/2018 11:26 PM, Hannah Massey wrote: > >> Currently we access a single SQLite database in a single thread but I am >> working on changing this as performance has become a real problem. We will >> be using WAL mode and there will be one thread for writes and multiple >> threads for reads. For many cases, speed will be of a priority and it will >> not matter if the data returned from a read is slightly out of date so I >> can considering using #pragma uncommitted in some of the reader threads. >> Will #pragma uncommitted work in WAL mode and will it have the effect I'm >> looking for (where the read will be faster because it can ignore the >> recently written information in the WAL File) and simply use the database >> file only? >> > > Don't use "PRAGMA read_uncommitted". It is a no-op unless you turn on > shared-cache mode. And using shared-cache mode reduces the concurrency > provided by using wal mode. > > Dan. > > > > _______________________________________________ > sqlite-users mailing list > [email protected] > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list [email protected] http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

