Liam Healy wrote:
I have a database that has one writer which runs once a day, and
potentially many readers running whenever someone wants some
information.  I am trying to understand concurrency in sqlite3 so that
I can have the writer run each day, regardless of whether a reader is
already running or a reader starts up after the writer is running.
The best you can do is make a copy of the database just before you want to run the writer, make the updates, and then switch the readers to the new file.

Using attach could make this simpler, and it could fly if the file can fit in RAM. Something like open a memory database, attach the real one, copy its contents to memory, do the updates, and in one transaction copy back. Or, since the writer runs just once a day, just keep an extra copy and update that.

There are various possibilities, but if you really really need the concurrency you talk about, SQLite is probably not for you.

HTH,

Gerry


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to