Given the following schema:
CREATE TABLE foo (_id integer primary key, x, y);
CREATE INDEX i on foo(_id, x, y);
And the following query
sqlite> EXPLAIN QUERY PLAN SELECT * FROM foo WHERE x=1 GROUP BY _id ORDER
BY y;
I would have expected it (hoped?) that it would use the covering index for
the order by. Any clue why it doesn't or what I could do differently to
get it to use an index for the selection, the grouping, and the ordering?
selectid = 0
order = 0
from = 0
detail = SCAN TABLE foo
selectid = 0
order = 0
from = 0
detail = USE TEMP B-TREE FOR ORDER BY
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users