> Perhaps, but the examples I usually find when cleaning up code are of 

> the variety where a script executes one statement to find a list of 

> parent records, iterates through those records and inside the loop it 

> executes another statement (sometimes multiple statements!) to get the 

> details, update records, etc.



That's usually bad...



But that doesn't mean that ONE more DB query will kill you.



And there are times when the JOINs for the one-query solution will kill you 
anyway, but with proper pagination, the dozen multi-query solution will zip 
along merrily.



What is "good" for the DB storage and what users end up wanting collated on a 
page are occasionally at odds, especially for the admin pages.



If you've tweaked the front-facing user side and correctly laid-out the DB for 
maximum scalability for the users, the admin side can sometimes be a bit hairy 
like that...



Which is fine, since the admin side is much less trafficked.



Short Version:

Sometimes you should break the rules. Knowing when is called "experience"



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to