On Wed, 2007-06-13 at 10:36 -0400, Guillaume Theoret wrote:
> Hi everyone,
> 
> Can anyone recommend any good books/resources for php and mysql
> performance management? I'm more interested in the software
> development side (as opposed to server configuration) of things. I'm
> looking for anything that would be good to know when working on
> websites that get millions of hits a day.
> 
> Also, if anyone knows of any resources/discussions that illustrate the
> relative performance of joins vs multiple selects I'd love to check it
> out.

JOIN will almost always be faster by virtue of the query being optimized
and doing the work within a single request.

JOIN couples two table together.

JOIN simplifies the data retrieval and code.

MULTIPLE SELECTS allows you to join the data yourself, possibly almost
as fast as the database.

MULTIPLE SELECTS allows the tables to reside in different locations.

MULTIPLE SELECTS can be faster than a JOIN if your database is under
heavy load and you place the tables on different servers allowing the
PHP process to do the joining work. PHP processes scale horizontally
better than database servers.

MULTIPLE SELECTS are usually add complexity to your code.

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

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

Reply via email to