Re: Large Calculations
| From: | Jay Paulson | Date: | Mon, 30 Jul 2001 17:12:39 +0000 |
| Subject: | Re: Large Calculations | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-60245@lists.php.net to get a copy of this message | ||
why don't you calculate the stats every time someone inserts new stats...
you could have a column in your table for the average of the stats you
want.. that way when you want to call them back up all you have to do is get
that one column and save your cpu all that processing power... that's my
thought.. :)
jay
----- Original Message -----
From: "Jeff Lewis" <jeff@hyrum.net>
To: <php-general@lists.php.net>
Sent: Monday, July 30, 2001 12:11 PM
Subject: [PHP] Large Calculations
> I have a mySQL database holding baseball stats and I want to calculate
> rankings on these players. Now I'd obviously want this to be as fast as
> possible since I go through about 600 players but where is it best to make
> them? In the SQL command itself or in PHP?
>
> players need to have at least 100 at bats for this formula to work for
them.
> There are 6 steps.
>
> 1. batting average x .05
> 2. doubles + triples + HR divided by at bats
> 3. runs scored divided by at bats
> 4. rbi's divided by at bats
> 5. stolen bases divided by at bats
> next add up the 5 totals then multiply that total by 200. It's a bse 100
> system. a rating over 100 is very good.
>
> Jeff
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>