Re: [PHP] Newbie Q: Fetching vs. Looping

2002-06-29 Thread Duncan Hill
On Sat, 29 Jun 2002, Chris Shiflett wrote: > Duncan Hill wrote: > > >Is a free required for every query? Or can I go connect, query, query, > >query, free, close? > > > > You never have to free your results if you don't want to. As I > understand it, doing so simply frees up the memory that

Re: [PHP] Newbie Q: Fetching vs. Looping

2002-06-29 Thread Chris Shiflett
Duncan Hill wrote: >Is a free required for every query? Or can I go connect, query, query, >query, free, close? > You never have to free your results if you don't want to. As I understand it, doing so simply frees up the memory that is being taken up by the result set ($result in most exampl

Re: [PHP] Newbie Q: Fetching vs. Looping

2002-06-29 Thread Duncan Hill
On Sat, 29 Jun 2002, Chris Shiflett wrote: > 2) if not, try very specific queries that retrieve just the data you need, > and carefully free all results as you finish - also try to use persistent > connections if you forsee your site being under heavy load. Something I haven't picked up in my re

Re: [PHP] Newbie Q: Fetching vs. Looping

2002-06-29 Thread Chris Shiflett
Jed Verity wrote: >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 a hard qu

RE: [PHP] Newbie Q: Fetching vs. Looping

2002-06-29 Thread John Holmes
M > To: [EMAIL PROTECTED] > 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 lar

[PHP] Newbie Q: Fetching vs. Looping

2002-06-29 Thread Jed Verity
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 numb