On 16 Aug 2011, at 1:54pm, Filip Navara wrote: > On Tue, Aug 16, 2011 at 2:24 PM, Simon Slavin <slav...@bigfraud.org> wrote: >> >> On 16 Aug 2011, at 9:39am, Filip Navara wrote: >> >>> Full-table scan is done even if an index exists that covers all the >>> data required by the query. >> >> That's a little strange. >> >> Please execute the SQL command ANALYZE on that database. Then do your >> 'EXPLAIN' tests again. It won't fix the problem but it'll tell us something >> useful. >> >> http://www.sqlite.org/lang_analyze.html > > It doesn't fix anything. It's not even possible to force the index > usage using INDEXED BY.
You know, I wasn't thinking. I thought you were doing a query which selected on a,d or used them in an ORDER BY clause. I can see now why SQLite would not consider optimizing by using your index. However, I can also see your point that using such optimization would save considerable time. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users