On Sat, 30 Jan 2016 19:03:12 +0100
Yannick Duch?ne <yannick_duchene at yahoo.fr> wrote:

> > On 30 Jan 2016, at 4:55pm, Yannick Duch?ne <yannick_duchene at yahoo.fr> 
> > wrote:
> > 
> > > Tweaking a query, I notice a query executed after I did an `explain query 
> > > plan <query>`, executes faster than before it occured.
> > 
> > Computer reads data from disk when you do the "EXPLAIN QUERY PLAN".  Data 
> > still in cache when you run the real SELECT.
> > 
> > To see something similar run the same SELECT twice.
> 
> I forget to tell: I though about it, and tried this. Running the query 
> multiple times, does not change the timing that much (just minus 15 to 20ms).

That's strange, or may be it's SQLiteBrowser specific (I'm using it to test 
queries and get timings).

If I copy the query of the view (the query is for a view), and execute it 
as?is, I get the same 200ms, although I do this after `explain query plan 
select * from <view>` and `select * from <view>` runs in about 120ms. Then, if 
I do the same with this copy, that is, on time add `explain query plan` before 
the copied query, the same happens, later runs are in 120ms instead of 200.

That's not query caching, as both queries are the same.

-- 
Yannick Duch?ne

Reply via email to