On Mon, Jun 16, 2014 at 5:07 AM, David Empson <demp...@emptech.co.nz> wrote:
> It appears SQLite 3.8.1 removed an optimisation where earlier versions of > the query planner were checking for two or more "lower bound" comparisons > against the key for an index, and combining them so the greater of the two > values was used as a lower bound. > > There never has been any such optimization in SQLite. If it picked the better lower bound in 3.8.0, then that was purely by luck. I suggest you rewrite your query. Instead of ... WHERE x BETWEEN ?1 AND ?2 AND x>?3 Consider using ... WHERE x BETWEEN max(?1,?3) AND ?2 AND x>?3 Also, when running EXPLAIN, please first give the command-line shell the ".explain" command in order to set output formatting up to show the program listing in a more readable format. -- D. Richard Hipp d...@sqlite.org _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users