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

前端 未结 8 884
忘了有多久
忘了有多久 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 03:42

    Just using ARITHABORT wont solve the problem, especially if you use parameterised stored procedures.

    Because parameterised stored procedures can cause "parameter sniffing", which uses cached query plan

    So, before jumping into conclusion, please check below link.

    the-elephant-and-the-mouse-or-parameter-sniffing-in-sql-server

提交回复
热议问题