Whats more efficient....?

From: Date: Mon, 24 Jun 2002 06:01:14 +0000
Subject: Whats more efficient....?
Groups: php.db 
Request: Send a blank email to php-db+get-20025@lists.php.net to get a copy of this message
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?

« previous php.db (#20025) next »