Re: Objects as array key names??
| From: | Jim Lucas | Date: | Sun, 16 Mar 2008 19:30:36 +0000 |
| Subject: | Re: Objects as array key names?? | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-271664@lists.php.net to get a copy of this message | ||
Robert Cummings wrote:
On Sun, 2008-03-16 at 11:42 -0700, Jim Lucas wrote:That beats my example. My current project at work, rebuilding the billing system, topped at about 6000 queries in one page. But, that page could vary by the number of services/locations a given customer has, the large the number of services/locations, the larger the number of queries. Right now, one customer has about 3500 services in 5 different locations. I have been able to pair the number of queries down to a dozen or so. Not sure what the previous developer was thinking.... The DB is much happier! JimRobert Cummings wrote:Ah, ok. I've inherited projects in the past where the kind of code you showed was defacto... except the number of queries made to render a homepage wasn't 201 it was thousands. In one case someone built a category pullout menu that was generating close to 18000 queries. That holds my record for inefficient DB queries. Cheers, Rob.Imagine 200 customers in your example... your example will hit the DB 201 times. The above hits the DB twice.My code was intended to get the concept across. Thanks for the suggestions though.