Re: which one is optimized
From: Vinodk (vinodk_sct_at_NO_SPAM_hotmail.com)
Date: 04/14/04
- Next message: Vinodk: "Re: Want to make as Corrlated subquery."
- Previous message: Eric Huang: "Re: SQL Server 2000 Client Tool License"
- In reply to: Noorali Issani: "which one is optimized"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 14 Apr 2004 09:39:06 +0530
I would also go for the normal ANSI Joins method rather than the
conventional correlated sub query option.
-- HTH, Vinod Kumar MCSE, DBA, MCAD, MCSD http://www.extremeexperts.com Books Online for SQL Server SP3 at http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp "Noorali Issani" <naissani@softhome.net> wrote in message news:ed8SQkRIEHA.3224@TK2MSFTNGP09.phx.gbl... > Can you tell me which one is optimized ? > > 1) > SELECT au_lname, au_fname > FROM authors > WHERE 100 IN > (SELECT royaltyper > FROM titleauthor > WHERE titleauthor.au_ID = authors.au_id) > > 2) > SELECT distinct au_lname, au_fname > FROM authors inner join titleauthor > on titleauthor.au_ID = authors.au_id > WHERE royaltyper = 100 > >
- Next message: Vinodk: "Re: Want to make as Corrlated subquery."
- Previous message: Eric Huang: "Re: SQL Server 2000 Client Tool License"
- In reply to: Noorali Issani: "which one is optimized"
- Messages sorted by: [ date ] [ thread ]