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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Better Performance
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Sonu619
Posting Yak Master

202 Posts

Posted - 12/10/2012 :  23:21:03  Show Profile  Reply with Quote
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 - 12/10/2012 :  23:38:53  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

India
2242 Posts

Posted - 12/10/2012 :  23:45:47  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 6.01 seconds. Powered By: Snitz Forums 2000