Increasing the Command Timeout for SQL command

前端 未结 5 1758
死守一世寂寞
死守一世寂寞 2020-12-08 09:04

I have a little problem and hoping someone can give me some advice. I am running a SQL command, but it appears it takes this command about 2 mins to return the data as there

5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-08 09:44

    Setting CommandTimeout to 120 is not recommended. Try using pagination as mentioned above. Setting CommandTimeout to 30 is considered as normal. Anything more than that is consider bad approach and that usually concludes something wrong with the Implementation. Now the world is running on MiliSeconds Approach.

提交回复
热议问题