RE: [PHP] Newbie Q: Fetching vs. Looping
| From: | John Holmes | Date: | Sat, 29 Jun 2002 22:00:10 +0000 |
| Subject: | RE: [PHP] Newbie Q: Fetching vs. Looping | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-104532@lists.php.net to get a copy of this message | ||
Depends what you're after. Your query should always return exactly the
data you are after. Your tables should be arranged so that is possible.
---John Holmes...
> -----Original Message-----
> From: Jed Verity [mailto:jed@veritys.com]
> Sent: Saturday, June 29, 2002 5:10 PM
> To: php-general@lists.php.net
> Subject: [PHP] Newbie Q: Fetching vs. Looping
>
> Hello Again, Folks,
>
> I've been testing this for a while and keep coming up with mixed
results.
> In
> general, is it faster and more efficient to query a MySQL database
once
> with
> a large SQL select statement and then loop through the huge resulting
> table?
> Or does it make better sense to perform a number of smaller queries
with
> smaller resulting tables?
>
> This is the kind of stuff they just don't seem to talk about in the
> manuals.
> Any insight is appreciated. Sorry for the ignorant question!
>
> Jed
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php