Wednesday, April 06, 2011


SQL Server: Summary of Join Properties

An oldie but a goldie: a nice Summary of Join Properties


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.

By Blogger piers7, at April 08, 2011 1:54 pm  

Post a Comment

<< Home

Powered by Blogger