On 2016/08/06 10:50 PM, Rob Willett wrote:
Our understanding of this is that many processes can READ the database
at the same time but NO process can INSERT/UPDATE if another is
reading. We had thought that one process can write and multiple
processes can read. Our reading (no pun intended) now of this
paragraph from the manual is that you cannot write if one or more
processes is reading. Have we understood this correctly? If so is
there an easy way to get around this?
The Write-Ahead-Log (WAL) journal mode will help you. It basically
allows a writer to write to the WAL Log in stead of the main database so
that any amount of readers can still do their thing reading the database
(and the parts of the WAL journal that is already committed, or even
parts still in progress if you use "read_uncommitted" mode). SQLite then
pushes committed data into the DB file based on Checkpoints which you
can invoke directly or set up to happen every so often.
This is the new way to do things and the way you should always use
unless you have a specific reason not to (which might include file
restrictions, needing read-only-ness, separate speedy DBs that doesn't
fsync() so much, etc.)
More information here:
https://www.sqlite.org/wal.html
Your DB is quite big and it seems you write often, so please take
special note of this section:
https://www.sqlite.org/wal.html#bigwal
HTH - Cheers,
Ryan
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users