On 10 November 2014 16:03, Don V Nielsen <donvniel...@gmail.com> wrote: > Isn't this the result of the results cache? The two queries are identical. >
The query plan changes... . . . sqlite> explain query plan select count(*) from v where z = 0 and ...> ( y between 1000000 and 1001000 ...> or y between 2000000 and 2001000 ...> or y between 3000000 and 3001000 ...> or y between 4000000 and 4001000); 0|0|0|SEARCH TABLE v USING COVERING INDEX w (z=?) sqlite> sqlite> sqlite> analyze; sqlite> sqlite> sqlite> explain query plan select count(*) from v where z = 0 and ...> ( y between 1000000 and 1001000 ...> or y between 2000000 and 2001000 ...> or y between 3000000 and 3001000 ...> or y between 4000000 and 4001000); 0|0|0|SEARCH TABLE v USING COVERING INDEX w (z=? AND y>? AND y<?) 0|0|0|SEARCH TABLE v USING COVERING INDEX w (z=? AND y>? AND y<?) 0|0|0|SEARCH TABLE v USING COVERING INDEX w (z=? AND y>? AND y<?) 0|0|0|SEARCH TABLE v USING COVERING INDEX w (z=? AND y>? AND y<?) sqlite> Regards, Simon _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users