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 <[email protected]> wrote: > On Tue, Sep 13, 2011 at 6:23 AM, François > <[email protected]>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 > > [email protected] > >http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > -- > D. Richard Hipp > [email protected] > _______________________________________________ > sqlite-users mailing list > [email protected]http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

