On 16 Jun 2018, at 8:12am, x <[email protected]> wrote:

> In my travels the only thing I found was a tumbleweed thread on stackoverflow 
> where an sqlite user was complaining that the first time he ran a query it 
> took 10 times longer than subsequent executions. He said he raised the point 
> on this forum but was told it was a windows issue. [snip]

Caching.  The first time through it secures enough memory to store stuff.  
Although it clears this memory out at the end of the first run, when it needs 
that memory again it has a beautiful long clear block all ready to allocate in 
one operation.

> Simon, the .333 didn’t help. I was unable to test the memory stick as the 
> only one I had wouldn’t accept a file of MyTemp.db size. There was enough 
> room so I’m not sure what the problem was.

You need at least twice as much free space as your intended filesize.

But at least you eliminated one of the known foibles of windows, in that it 
treats files it expects to be databases weirdly when it tries to cache them.

From everything I've read in this thread, your unexpected timings are all 
related to Windows caching foibles.  And you can't turn it off, so you may as 
well just get used to it.  The hope on the horizon is that each version of 
Windows caches differently, so a future version may do something different.

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

Reply via email to