> > > > > 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. >
Well, as I wrote it's workaround. One can use it to avoid massive reads until SQLITE behaviour is fixed. I absolutely agree with you that this behaviour of SQLITE should be explained. Or considered as defect and fixed. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users