An oldie but a goldie: a nice Summary of Join Properties
1 thought on “SQL Server: Summary of Join Properties”
Comments are closed.
SQL Server, performance, data, analytics
An oldie but a goldie: a nice Summary of Join Properties
Comments are closed.
One of the interesting bits here is the fact that the hash join (and hash aggregate) don't preserve input order.
I inferred this the hard way when one of my query optimizations actually took me backwards, apparently because the resulting 'natural' order coming out of a different sequence of hash joins was different, and ended up needing an additional sort from what had previously been the case.
I'm still not sure how you can determine what the effective sort order of data coming out of a hash is: you'd imagine it'd be by the hash key, but that didn't seem to be the case.