Re: [PHP] Sub selects vs nested loop was:Re: [PHP] You know you're a geek when...

2004-11-08 Thread Greg Donald
On Mon, 08 Nov 2004 21:57:41 +0600, raditha dissanayake
<[EMAIL PROTECTED]> 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/

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



[PHP] Sub selects vs nested loop was:Re: [PHP] You know you're a geek when...

2004-11-08 Thread raditha dissanayake
Greg Donald wrote:
On Mon, 08 Nov 2004 10:40:30 +0600, raditha dissanayake
<[EMAIL PROTECTED]> wrote:
 

You know you're a geek when you know which list deals with which top
and when you know that subselects in mysql is not much faster than the
nested loop you have been using.
   

Can you point me to some benchmarks that support this claim?  Thanks.
 

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 :-) )

--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] You know you're a geek when...

2004-11-08 Thread Greg Donald
On Mon, 08 Nov 2004 10:40:30 +0600, raditha dissanayake
<[EMAIL PROTECTED]> wrote:
> You know you're a geek when you know which list deals with which top
> and when you know that subselects in mysql is not much faster than the
> nested loop you have been using.

Can you point me to some benchmarks that support this claim?  Thanks.


-- 
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/

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



Re: [PHP] You know you're a geek when...

2004-11-07 Thread raditha dissanayake
Ryan King wrote:
On Sunday, November 07, 2004, at 10:38PM, raditha dissanayake <[EMAIL 
PROTECTED]> wrote:
 

Murray @ PlanetThoughtful wrote:
   

.You upgrade MySQL from 4.0.x to 4.1.x and you get excited because now you
can include subselects in your pages.
 

You know you're a geek when you know which list deals with which top  
and when you know that subselects in mysql is not much faster than the 
nested loop you have been using.
   

You know you're a geek when you know there's more to software development than speed.
 

and compatibility.
-ryan
 


--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] You know you're a geek when...

2004-11-07 Thread Ryan King
 
On Sunday, November 07, 2004, at 10:38PM, raditha dissanayake <[EMAIL 
PROTECTED]> wrote:

>Murray @ PlanetThoughtful wrote:
>
>>.You upgrade MySQL from 4.0.x to 4.1.x and you get excited because now you
>>can include subselects in your pages.
>>  
>>
>You know you're a geek when you know which list deals with which top  
>and when you know that subselects in mysql is not much faster than the 
>nested loop you have been using.

You know you're a geek when you know there's more to software development than 
speed.


-ryan

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



Re: [PHP] You know you're a geek when...

2004-11-07 Thread raditha dissanayake
Murray @ PlanetThoughtful wrote:
.You upgrade MySQL from 4.0.x to 4.1.x and you get excited because now you
can include subselects in your pages.
 

You know you're a geek when you know which list deals with which top  
and when you know that subselects in mysql is not much faster than the 
nested loop you have been using.

Much warmth,
Murray
http://www.planetthoughtful.org
Building a thoughtful planet,
One quirky comment at a time.
 


--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] You know you're a geek when...

2004-11-07 Thread Murray @ PlanetThoughtful
.You upgrade MySQL from 4.0.x to 4.1.x and you get excited because now you
can include subselects in your pages.

Much warmth,

Murray
http://www.planetthoughtful.org
Building a thoughtful planet,
One quirky comment at a time.

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