SQL Server Performance Forum – Threads Archive
Subquery versus JoinAll, Which is more efficient in terms of execution time?Subquery or Joins.I have a query which links three tables,Thanks for your valuable replies.
If I remeber correctly SQL Server is usally smart enough and will come up with same execution plan for both scenarios. But test it to be 100% sure.
When i see the execution plan for both the queries, it shows same no of percentage for them.I’m still not convinced yet!?
Then wait for someone else to post and convince you [<img src=’/community/emoticons/emotion-2.gif’ alt=’‘ />]
The optimizer tends to produce efficient plans for joins, but in many cases, the optimizer produces the same plan for the subquery equivalent. For example, when you use the EXISTS() function, the optimizer might come up with a better plan than the join query equivalent. Whatever method you choose, you need to test, test, and test.
This posting is provided â€œAS ISâ€ with no rights for the sake of knowledge sharing.