query optimizer operator choice - nested loops vs hash match (or merge)

后端 未结 2 837
一生所求
一生所求 2020-12-14 02:28

One of my stored procedures was taking too long execute. Taking a look at query execution plan I was able to locate the operation taking too long. It was a nested loop physi

2条回答
  •  攒了一身酷
    2020-12-14 02:42

    I would not recommend trying to "fix" the plan by forcing the hints in one direction or another. Instead, you need to look to your indexes, statistics and the TSQL code to understand why you have a Table spool loading up 1.2billion rows from 19000.

提交回复
热议问题