Query times out when executed from web, but super-fast when executed from SSMS

前端 未结 8 861
忘了有多久
忘了有多久 2020-11-27 02:57

I\'m trying to debug the source of a SQL timeout in a web application that I maintain. I have the source code of the C# code behind, so I know exactly what code is running.

8条回答
  •  一向
    一向 (楼主)
    2020-11-27 04:00

    I have the same problem when trying to call SP from SMSS it took 2 sec, while from the webapp (ASP.NET) it took about 3 min.

    I've tried all suggested solutions sp_recompile, DBCC FREEPROCCACHE and DBCC DROPCLEANBUFFERS but nothing fixed my problem, but when tried parameter sniffing it did the trick, and worked just fine.

提交回复
热议问题