Hi sakuraime,
Please also check this doc:
Best Regards,
Amelia
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Just interesting how to determine the threshold rows of the adaptive join which switch between hash or nested loop ?
Hi sakuraime,
If the Adaptive Threshold Rows is more than an actual number of rows, SQL Server Engine has preferred nested loop join. If the Adaptive Threshold Rows is less than an actual number of rows, SQL Server Engine has preferred Hash Match join.
Please refer to this article.
Best Regards,
Amelia
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
I mean how this number comes out ?
>
half of the actual rows or what?
I have not checked, but I can't but see that this is a number which is determined at compile time. That is, the optimizer estimates that if the actual number of rows coming into the Adaptive Join operator is lower than the threshold, the nested loops will be the cheapest join method, and but the hash is estimated to be better if the number is above the threshold.