Re: [SQLDownUnder] INNNER JOIN?


    [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
    • From: Damian Maclennan
    • Subject: Re: [SQLDownUnder] INNNER JOIN?
    • Date: Wed, 09 Mar 2005 13:26:29 +1100

    Yes, there is a difference, which will usually impact performance.
    
    an IN clause will do the inner query and return a set to be evaluated.
    EXISTS will stop looking as soon as the condition is met.
    
    
    
    On Wed, 9 Mar 2005 13:20:20 +1100, Junying Xue <xuej@xxxxxxxxxxxxxx> wrote:
    > 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
    
    
    



    (Click here for more information on the sqldownunder mailling list)