To NOLOCK or NOT to NOLOCK, that is the question

后端 未结 5 615
时光说笑
时光说笑 2021-01-31 11:57

This is really more of a discussion than a specific question about nolock.

I took over an app recently that almost every query (and there are lots of them) has the noloc

5条回答
  •  耶瑟儿~
    2021-01-31 12:25

    No, there is no need to use NOLOCK. Links: SO 1

    As for load, we deal with 2000 rows per second which is small change compared to 35k TPS

    Deadlocks are caused by lock contention and usually caused by inconsistent write order on tables in transactions. ORMs especially are rubbish at this. We get them very infrequently. A well written DAL should retry too as per MSDN.

提交回复
热议问题