Re: [sqlite] To index or not to index?

2011-06-13 Thread Black, Michael (IS)
Ummm...wouldn't it be a whole lot simpler and faster to have an "Online" table? One id is all that's needed unless you want other info. Then you're just inserting and deleting records and the whole table is "online" at any moment. I don't see any reason why this online status needs to be

Re: [sqlite] To index or not to index?

2011-06-13 Thread Timothy Legge
On Mon, Jun 13, 2011 at 8:46 AM, Richard Hipp wrote: > That depends on what fraction of entries have isOnline=1.  If isOnline is > rare, then an index might be helpful.  But if roughly have the entires have I wondered about that. > It seems to me, though, that you are

Re: [sqlite] To index or not to index?

2011-06-13 Thread Richard Hipp
On Mon, Jun 13, 2011 at 6:51 AM, Ian Hardingham 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. > > Every ten seconds I need to compile a

Re: [sqlite] To index or not to index?

2011-06-13 Thread Timothy Legge
On Mon, Jun 13, 2011 at 7:51 AM, Ian Hardingham 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

[sqlite] To index or not to index?

2011-06-13 Thread Ian Hardingham
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. Every ten seconds I need to compile a list of all users where isOnline is 1. However, people log in and out at a rate of