patternsqlModerate
Which is faster join
Viewed 0 times
whichfasterjoin
Problem
Which is faster
or
SELECT * FROM X INNER JOIN Y ON x.Record_ID = y.ForignKey_NotIndexed_NotUniqueor
SELECT * FROM X INNER JOIN Y ON y.ForignKey_NotIndexed_NotUnique = x.Record_IDSolution
There will be no difference - the query engine in mssql (and in most database engines) will build the same query plan for both. You can verify this by viewing the estimated and actual query plan in SQL Workbench.
Context
StackExchange Database Administrators Q#11697, answer score: 17
Revisions (0)
No revisions yet.