hey, can i hijack my message back?...this thread is about the performance of
subselects, not stored procedures. go write your own message :-)...
so....the original question is if someone would be nice enough to answer..
====> Do any MySql coders writing subselects in 4.1 know whether EXISTS will
outperform an equivalent query written as a join. <=====
Typically, db vendors recommend you use an exists clause, not a join when
testing for the presence of child data because it's faster.
e.g.
4.1 version (faster?)
---------------------
select person.person_id, person.name from person where exists ( select 1
from invoice where invoice.paid is null and invoice.person_id =
person.person_id)
vs
4.0 version (slower?)
----------------------
select DISTINCT person.person_id, person.person_name from person, invoice
where person.person_id = invoice.person_id and invoice.paid is null
Thanks,
Greg.
----- Original Message -----
From: "Dan Rossi" <daniel@stripped>
To: "Victoria Reznichenko" <victoria.reznichenko@stripped>;
<mysql@stripped>
Sent: Monday, November 11, 2002 11:04 PM
Subject: RE: RE: MySql 4.1 Sub Selects
> damn , i read it was 4.1 i guess we have to wait a bit then, i wish i
could
> program some c ++ to hurry it along a bit, i dont really have access to
DB's
> like oracle to learn stored procedure stuff
>
> -----Original Message-----
> From: Victoria Reznichenko [mailto:victoria.reznichenko@stripped]
> Sent: Monday, November 11, 2002 11:00 PM
> To: mysql@stripped
> Subject: re: RE: MySql 4.1 Sub Selects
>
>
> daniel,
> Monday, November 11, 2002, 3:51:25 AM, you wrote:
>
> d> will 4.1 hopefully have stored procedure functionality ?
>
> Nope.
> Stored procedures will be implemented around v5.0
>
>
> --
> For technical support contracts, goto https://order.mysql.com/?ref=ensita
> This email is sponsored by Ensita.net http://www.ensita.net/
> __ ___ ___ ____ __
> / |/ /_ __/ __/ __ \/ / Victoria Reznichenko
> / /|_/ / // /\ \/ /_/ / /__ Victoria.Reznichenko@stripped
> /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net
> <___/ www.mysql.com
>
>
>
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
> http://www.mysql.com/manual.php (the manual)
> http://lists.mysql.com/ (the list archive)
>
> To request this thread, e-mail <mysql-thread124619@stripped>
> To unsubscribe, e-mail
> <mysql-unsubscribe-daniel=electroteque.org@stripped>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
> http://www.mysql.com/manual.php (the manual)
> http://lists.mysql.com/ (the list archive)
>
> To request this thread, e-mail <mysql-thread124626@stripped>
> To unsubscribe, e-mail
<mysql-unsubscribe-greg55=ozemail.com.au@stripped>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>