Choice of Join hash join

sakuraime 2,351 Reputation points
2020-08-19T06:46:47.407+00:00

I believe sql server optimizer will choose loop join if one of the input table will be relatively small . like few rows. but in the following example show that it use hash join and using the smaller table as to build hash column in memory . so the query optimizer make a wrong choice ?

18732-hasjoin.jpg

SQL Server | Other
0 comments No comments
{count} votes

Answer accepted by question author
  1. Cris Zhan-MSFT 6,671 Reputation points
    2020-08-21T09:07:17.647+00:00

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.