On Mon, Jun 13, 2011 at 7:51 AM, Ian Hardingham <i...@omroth.com> wrote: > Hey guys, once again sorry for spamming at the moment. > > This is a simple question. > > My user account table has a field "isOnline INT". This table has, say, > 100,000 rows.
My understanding is that if the number of possible values in a field are low (two in your case) then there is little benefit to a index (general SQL experience). In your case since the field would be rapidly changing as well I would guess that it would just add overhead. You may be able to use an already indexed field to limit your query before looking at the isOnline field. Something like: select * from users where last_login > 2011-05-30 and isOnline = 1 I would expect that to be fairly fast if your table as a similar field but I don't have much experience with sqlite indexes. Tim _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users