SqlCommand object, what length of time for CommandTimeout?

后端 未结 5 1660
-上瘾入骨i
-上瘾入骨i 2021-01-03 19:58

How do I decide what length of time to use as a timeout when using an SqlCommand object?

On parts of the code I\'m working on (written by somebody else) I have:

5条回答
  •  自闭症患者
    2021-01-03 20:26

    You should calculate how much time will take the longest possible query and probably multiply that value by 1.5 to handle server overload, network traffic, etc ...

提交回复
热议问题