On Tue, Jul 26, 2011 at 8:50 PM, Григорий Григоренко <grigore...@mail.ru>wrote:
> > EXPLAIN QUERY PLAN SELECT * FROM foo WHERE bar = 'three' and id > 2900000 > LIMIT 10; > > SELECT * FROM foo WHERE bar = 'three' and id > 2900000 LIMIT 10; > > > Run query. Now using idx2 index SQLITE reads only about 20 Kbytes! > > > Grigory, it seems you just added a field and copied rowid column to it, so your fast query is equivalent to queries with general fields that works as expected (see my post about a,b,c fields). Id that is mapped to rowid is still has special treatment and not used effectively. This still has to be explained. But if your requirements to your base allows you to add extra field, I think you can use it, just support autoincrement feature some other way. Max _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users