HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlModerate

Which is faster join

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
whichfasterjoin

Problem

Which is faster

SELECT * FROM X INNER JOIN Y ON x.Record_ID = y.ForignKey_NotIndexed_NotUnique


or

SELECT * FROM X INNER JOIN Y ON y.ForignKey_NotIndexed_NotUnique = x.Record_ID

Solution

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.