Hello Richard, and thank you for this fast answer. Can we consider that creating an index for an integer field is a good practice if this field has at least 3 possible values ? Or more ?
Best Regards, François On 13 sep, 13:33, Richard Hipp <d...@sqlite.org> wrote: > On Tue, Sep 13, 2011 at 6:23 AM, François > <francois.goldgewi...@gmail.com>wrote: > > > Hello, > > > Let us consider a table "ITEM" with a BOOLEAN field "FLAG". This table > > may contain up to 100 000 entries and those entries can be selected > > using "WHERE ITEM.FLAG = ?" conditions. > > > Is then a good or a bad practice to add an index on this field if we > > want to improve SELECT time execution ? > > Bad practice. It will likely make things worse, not better. > > > > > Please note that it concerns an iPhone app. > > > Thank you ! > > > Best Regards, > > > François > > _______________________________________________ > > sqlite-users mailing list > > sqlite-us...@sqlite.org > >http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > -- > D. Richard Hipp > d...@sqlite.org > _______________________________________________ > sqlite-users mailing list > sqlite-us...@sqlite.orghttp://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users