Re: Sub selects vs nested loop was:Re: [PHP] You know you're a geek when...
| From: | Greg Donald | Date: | Mon, 08 Nov 2004 18:45:01 +0000 |
| Subject: | Re: Sub selects vs nested loop was:Re: [PHP] You know you're a geek when... | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-201554@lists.php.net to get a copy of this message | ||
On Mon, 08 Nov 2004 21:57:41 +0600, raditha dissanayake
<jabber@raditha.com> wrote:
> Sorry no benchmarks, i am talking from personal experience where I
> converted some code from a php nested loop to mysql. I was rather
> surprised by the results. I will concede that I may not have optimized
> the query properly or that I may not have had the correct indexes, but
> since I have been doing this for quite a few years i like to think i got
> the query right. (feel free to deflate my ego :-) )
Well yeah.. It's hard to believe a well written MySQL sub select query
with proper indexing would be slower than looping through the results
with PHP scripting.
--
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/