Re: Saving loading time at counting rows

From: Date: Mon, 14 Jul 2008 19:57:43 +0000
Subject: Re: Saving loading time at counting rows
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-276780@lists.php.net to get a copy of this message
At 6:13 PM +0200 7/13/08, Joep Roebroek wrote:
I think, I will store the count and update it every 24 hours like tedd, says. I have thought of that earlier but was woundering if there might be another method. But I am wondering how google estimates the number of results, but I think that is a more complex thing :P. Thanks for the responses :) regards, Joep
If you want to estimate the number of responses and present the user with a more accurate estimate, that should be easy enough to do -- just look at the average for the last week; then update your estimate accordingly; and fix the actual number every 24 hours. For example, if you find that for the last week, your count increased by 100 per hour, then every time someone access your application, then create an estimation based upon that rate and record that in your database. Then when the 24 marker passes, then synchronize to the actual number and continue. That way the user will never see the same estimate twice. Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com

« previous php.general (#276780) next »