On Fri, Jan 28, 2011 at 11:03 AM, Marc Guay <marc.guay@xxxxxxxxx> wrote: > If COUNTing is the heavy part, why not create a 'users_logged_in' > field somewhere and increment it when someone logs in and decrement it > when someone logs out? Then your query is just a straight SELECT. If this is like most web sites, users don't usually log out--they just stop requesting pages. With no logout event to decrement the count you need some other way to stop counting a particular user such as 30 minutes after they logged in. This is easily handled in a query on the users table, but it causes performance issues. David