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

?

4
  • 5
    You were told incorrectly then! possible duplicate of WHERE clause better execute before IN and JOIN or after and INNER JOIN versus WHERE clause — any difference? May 16, 2011 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, 2011 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, 2011 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, 2011 at 17:05

1 Answer 1

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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.