On Tue, Aug 7, 2018 at 3:28 PM, Simon Slavin <[email protected]> wrote:

> On 7 Aug 2018, at 1:54pm, Gerlando Falauto <[email protected]>
> wrote:
>
> > I just realized I'm using default settings... perhaps I should use WAL
> mode
> > instead?
>
> How important is it to you that SELECT gets up-to-date information ?  If a
> read happens at the same time as a write:
>
> Normal mode: SELECT waits until the write is finished, then reads
>    WAL mode: SELECT immediately returns data from before the write
>
> (the above is simplified for short one-write one-read situations).
>


I don't think it's really that important, especially because writes should
be much quicker than reads (I should do some benchmarking though).
Ideally I would want a mixture of both modes, i.e. readers to wait until
all writers are done, but not the other way around -- but I guess that
can't be done.

What might happen in my case is that reads could take a very long time to
consume/process all the data (30s for instance), and I believe the lock is
held until all data is consumed.
I believe in that case the read would see all the data up to the point in
time when the SELECT was first issued, ignoring whatever happened later, is
that right?

Thank you,
Gerlando
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to