Hi,

In a server farm, it depends on which machine has the lighter load, MySQL
or PHP.

If you are talking about running on the same machine, probably joining in
MySQL would be faster as it is optimized C code, while PHP is still running
in a virtual machine.

In general, benchmarks are the best test as above a just generalizations.

Regards, John

"Matthew Nock" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Is it more efficient to run a SELECT query on a MySQL database that
> retrieves maybe 100 records from approximately 6 tables (based on one
> result - such as a product ID) and then process these results using
PHP....
>
> or is it more efficient to run say 6 SELECT statements that get the exact
> details we want, and in the process returning a smaller number of results
> over all?
>
> If its the first of the two, then is it possible to use the MySQL "Group
by"
> structure to group the results, and store the results of each "group" (for
> example a product category) in separate arrays?
>
> ie;  array_prodcat1, array_prodcat2 etc etc?
>
>



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

Reply via email to