Code Keeps Timing Out

后端 未结 4 1632
南笙
南笙 2021-01-22 18:18

So, we\'ve got this set of code that, for some reason, keeps timing out. It\'s not the stored procedure that it\'s running, because that runs fine. Also, if we remove the para

4条回答
  •  悲&欢浪女
    2021-01-22 18:50

    One thing could be the ARITHABORT setting, set it to ON...NET defaults to OFF

    run the proc in SSMS with ARITHABORT set to OFF and see if it runs slower now like from .NET

    example

    MyConnection.Execute "SET ARITHABORT ON"
    

    Another thing is that your WHERE clause is not optimal, take a look at Do you use Column=@Param OR @Param IS NULL in your WHERE clause? Don't, it doesn't perform

    does the proc run slow with parameters in SSMS? Can you show the execution plan?

提交回复
热议问题