SP taking 15 minutes, but the same query when executed returns results in 1-2 minutes

前端 未结 11 1125
失恋的感觉
失恋的感觉 2021-02-01 03:22

So basically I have this relatively long stored procedure. The basic execution flow is that it SELECTS INTO some data into temp tables declared with he #

11条回答
  •  余生分开走
    2021-02-01 03:55

    I usually start troubleshooting issues like that by using "print getdate() + ' - step '". This helps me narrow down what's taking the most time. You can compare from where you run it from query analyzer and narrow down where the problem is at.

提交回复
热议问题