Choice of Join hash join

sakuraime 2,341 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

Accepted answer
  1. Cris Zhan-MSFT 6,661 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 Answers by the question author, which helps users to know the answer solved the author's problem.