Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Better Performance

Author  Topic 

Sonu619
Posting Yak Master

202 Posts

Posted - 2012-12-10 : 23:21:03
Guys need Advise.

Here is Sample Datad

Option 1

SELECT
T.ID,
G.FNAME,
G.LNAME,
H.QUICK
From Table1 T,Table2 G,Table3 H
Where T.ID = G.ID
AND G.PID = H.PID


Option 2

SELECT
T.ID,
G.FNAME,
G.LNAME,
H.QUICK
From Table1 T
INNER JOIN TABLE2 G ON T.ID = G.ID
INNER JOIN TABLE3 H ON G.PID = H.PID

My question is what do you think which Option will give better Performance
Option 1 Or Option 2

Thank You in advance.

LoztInSpace
Aged Yak Warrior

940 Posts

Posted - 2012-12-10 : 23:38:53
There will be no difference as they queries are the same bar the syntax.
You should learn how to interpret the query plan - it will show you what's going on under the covers.
Go to Top of Page

bandi
Master Smack Fu Yak Hacker

2242 Posts

Posted - 2012-12-10 : 23:45:47
Performance-wise both are same.... Indirectly Option1 also uses INNER JOIN execution plan....
You can check the execution plan for both

--
Chandu
Go to Top of Page
   

- Advertisement -