1

Possible Duplicate:
WHERE clause better execute before IN and JOIN or after

Hello,

someone told me there is a performance difference for SQL Server queries when you use implicit vs. explict join notation.

What I mean is: does

SELECT *
  FROM employee 
INNER JOIN department
    ON employee.DepartmentID = department.DepartmentID;

give better performance than

SELECT * 
FROM   employee, department 
WHERE  employee.DepartmentID = department.DepartmentID

?

Community
  • 1
  • 1
Fabio
  • 1,037
  • 1
  • 10
  • 22
  • 5
    You were told incorrectly then! possible duplicate of [WHERE clause better execute before IN and JOIN or after](http://stackoverflow.com/questions/5463101/where-clause-better-execute-before-in-and-join-or-after) and [INNER JOIN versus WHERE clause — any difference?](http://stackoverflow.com/questions/1018822/inner-join-versus-where-clause-any-difference) – Martin Smith May 16 '11 at 15:53
  • Also, it's probably quicker to just run the queries and compare than to open a question here on which is faster. – JNK May 16 '11 at 15:56
  • 1
    There is no circumstance where you should be writing implicit code in any event. This is just plain bad code that was replaced by something better in 1992! – HLGEM May 16 '11 at 16:07
  • OK. Thank you. I’m sorry for posting a duplicate. I did some search, but apparently not enough, because I missed the other questions. I actually tried this on SQL Management Studio and got the same result on both formats for some simple queries but still wanted some expert opinions. Again thank you. – Fabio May 16 '11 at 17:05

1 Answers1

0

If you wish to satisfy yourself at the expense / execution time taken per approach then simply run the query in the Sql Server Management Studio and select the "include actual execution plan" to review the execution per query.

Brian Scott
  • 9,221
  • 6
  • 47
  • 68