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 2000 Forums
 SQL Server Development (2000)
 Innerjoin or sub query- which is Fast

Author  Topic 

sunil
Constraint Violating Yak Guru

282 Posts

Posted - 2006-12-20 : 07:27:22
I was recently asked as to whether Innerjoins are fast or subqueries are fast. I could not get any quantitative answer for this.Can any one please help me out in figuring out which one to use and is fast.also, where can i get information as how to read an execution plan. I am curious to read my SPs execution plan to enhance performance.
Regards

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2006-12-20 : 07:41:01
Generally Joins outperform subqueries in most of the cases. Of course, in such cases, the query optimizer internally tries to convert subqueries into joins.
The rule of thumb is if subqueries are better for smaller tables whereas joins are appropriate for large tables.

Check these links for information about Execution Plan:
[url]http://www.codeproject.com/cs/database/sql-tuning-tutorial-1.asp[/url]
[url]www.sql-server-performance.com/query_execution_plan_analysis.asp[/url]

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page
   

- Advertisement -