Re: [sqlite] How does the pager know whether its memory cache is still valid?

2016-10-24 Thread Dan Kennedy
On 10/25/2016 01:12 AM, Jens Alfke wrote: On Oct 24, 2016, at 1:31 AM, Rowan Worth wrote: OK, so the entire cache is invalidated when another process updates the DB, which is what I feared. In this case I'm looking at too many concurrent updates for caching to add much value. I’m no expert on

Re: [sqlite] How does the pager know whether its memory cache is still valid?

2016-10-24 Thread Jens Alfke
> On Oct 24, 2016, at 1:31 AM, Rowan Worth wrote: > > OK, so the entire cache is invalidated when another process updates the DB, > which is what I feared. In this case I'm looking at too many concurrent > updates for caching to add much value. I’m no expert on the internals, but the article li

Re: [sqlite] How does the pager know whether its memory cache is still valid?

2016-10-24 Thread Rowan Worth
On 24 October 2016 at 15:44, Clemens Ladisch wrote: > Rowan Worth wrote: > > How does sqlite determine that the cached page is out of date? > > http://www.sqlite.org/fileformat2.html#file_change_counter > > > Ultimately the question I'm trying to answer is whether increasing the > size > > of the

Re: [sqlite] How does the pager know whether its memory cache is still valid?

2016-10-24 Thread Clemens Ladisch
Rowan Worth wrote: > How does sqlite determine that the cached page is out of date? http://www.sqlite.org/fileformat2.html#file_change_counter > Ultimately the question I'm trying to answer is whether increasing the size > of the pager cache will reduce the amount of I/O required by a single > pr

[sqlite] How does the pager know whether its memory cache is still valid?

2016-10-24 Thread Rowan Worth
Hi guys, I haven't been able to figure this one out from the docs, nor have I stumbled onto the right section of the source. Say you have two separate processes accessing an sqlite DB. P1 starts a transaction, reads page #5, ends transaction. P2 starts a transaction, modifies page #5, ends transa