Robert Cummings wrote:
On Sun, 2008-03-16 at 11:42 -0700, Jim Lucas wrote:
Robert Cummings wrote:
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.
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.
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!
Jim
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php