Re: Counting Online users, but not using a Session Table in MySQL

From: Date: Fri, 28 Jan 2011 18:47:50 +0000
Subject: Re: Counting Online users, but not using a Session Table in MySQL
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-311074@lists.php.net to get a copy of this message
Jim, I'm already using the solution you mentioned. The problem is about the performance. One solution is to increase the performance by using Memcached. But counting online users always requires a __new__fresh__ COUNT(*) query, even under Memcahched. Since the COUNT(*) result is very dynamic and could change every second, it should not be cached. I'm looking for a faster way to count online users. COUNT(*) is time consuming under MySQL. Any light-weight solutions?

« previous php.general (#311074) next »