title: SQL - Execution Plan - Why is a Hash Match used for the JOIN operation?
body: <p>Quick question - why is there a Hash Match used for the following query?</p>
  
  <p><code>BusinessentityID</code> is of type <code>Int</code> and at this point I currently can't really explain why they need to use hashing at all? </p>
  
  <p>Wouldn't a merge be faster with a trivial array like data structure? </p>
  
  <p>Although I guess it would make sense in case when a different data type e.g a <code>GUID</code> is used in the join clause?</p>
  
  <p><a href="https://i.stack.imgur.com/DCfmQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DCfmQ.png" alt="enter image description here"></a></p>