On 14 Oct 2011, at 1:49pm, Fabian wrote: > 2011/10/14 Simon Slavin <slav...@bigfraud.org> > >> If you have an index on the data column then that's the index SQLite would >> used for that query. Once it has picked that index it no longer has access >> to the rowid index. >> >> CREATE INDEX tdr ON table (data, rowid) > > Thanks! That explains everything! Can I remove the index for 'data' if I > create an index like that, or do I need to keep them both?
You can remove the index on the single column. SQLite is smart enough to use the compound index even if it needs only the columns at the beginning of it. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users