| RE: [SQLDownUnder] INNNER JOIN? |
- From: Aaron Bull
- Subject: RE: [SQLDownUnder] INNNER JOIN?
- Date: Wed, 09 Mar 2005 13:41:46 +1100
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Have you done any reproducable tests to demonstrate the performance differences ? ________________________________ From: SQLDownUnderList@xxxxxxxxxxxxxxxxxxxxxx on behalf of Greg Low Sent: Wed 3/9/05 13:40 To: SQLDownUnder@xxxxxxxxxxxxxxxxxxxxxx Subject: RE: [SQLDownUnder] INNNER JOIN? Absolutely. Not In requires a list to be created in the sub-query. It would be nice if the optimiser recognised it and made it the same but I wouldn't want to depend on that behaviour. EXISTS can exit as soon as anything that proves the sub-query is found. Another little note as well: In SQL Server, you don't need to specify a column in the select statement in an EXISTS clause ie: it's the one situation where SELECT * is considered "good form", unlike what occurs in other databases. Regards, Greg -----Original Message----- From: SQLDownUnderList@xxxxxxxxxxxxxxxxxxxxxx [mailto:SQLDownUnderList@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Junying Xue Sent: Wednesday, 9 March 2005 12:20 PM To: SQLDownUnder@xxxxxxxxxxxxxxxxxxxxxx Subject: RE: [SQLDownUnder] INNNER JOIN? I know for sure that there is a performance difference between "not in" and "not exists" in Oracle. How about in SQL Server? -----Original Message----- From: SQLDownUnderList@xxxxxxxxxxxxxxxxxxxxxx [mailto:SQLDownUnderList@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of William Luu Sent: Wednesday, 9 March 2005 11:25 AM To: SQLDownUnder@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: [SQLDownUnder] INNNER JOIN? Thanks Aaron, that worked. On Wed, 9 Mar 2005 11:16:06 +1100, Aaron Bull <aaron@xxxxxxxxxxxx> wrote: <snip /> > select ItemID > from Items > where > ItemID not in (select distinct FK_ItemID from Products) > > Cheers, > > Aaron > to unsubscribe to this list, please send a message back to the list with 'unsubscribe' as the subject. Powered by mailenable.com - List managed by http://www.readify.net to unsubscribe to this list, please send a message back to the list with 'unsubscribe' as the subject. Powered by mailenable.com - List managed by http://www.readify.net to unsubscribe to this list, please send a message back to the list with 'unsubscribe' as the subject. Powered by mailenable.com - List managed by http://www.readify.net to unsubscribe to this list, please send a message back to the list with 'unsubscribe' as the subject. Powered by mailenable.com - List managed by http://www.readify.net
<<winmail.dat>>
(Click here for more information on the sqldownunder mailling list)
- Prev by Date: RE: [SQLDownUnder] INNNER JOIN?
- Next by Date: RE: [SQLDownUnder] When is SQL 2005 RTM'ing?
- Previous by thread: Re: [SQLDownUnder] INNNER JOIN?
- Next by thread: RE: [SQLDownUnder] INNNER JOIN?
- Index(es):
