lundi 6 juillet 2015

SQLite - lockless reading/writing without WAL

I'm dealing with potentially large database files (10GB+) with potentially large inserts/deletes (around 50k-100k records).

In my case there is exactly one daemon process writing to that file, and one or more are reading from that file.

My problem is that during the writing, I get the following exception message in the readers:

OperationalError: database is locked

I know about the WAL, but unfortunately I cannot use it as my SQLite version is 3.6.20 (which I'm stuck with).

Physically copying the DB file, performing the inserts and then replacing the original takes too much time (as the files are quite large).

Is there any other way to enable simultaneous access to a DB that is currently written to? I don't care if the results aren't the most recent and accurate, I just want some result.

Aucun commentaire:

Enregistrer un commentaire