Where I work in stored procedures in sql, the WITH(NOLOCK)
construction is quite actively used. It is used for data that can be requested very often and as I was told its use is justified due to performance considerations. As far as I know, WITH(NOLOCK)
is an analogue of the READ UNCOMMITTED
isolation level and means no table locks when executing queries.
However, on Habré in the article " 7 things that a developer should know about SQL Server " they write that firstly WITH(NOLOCK)
does not guarantee the absence of locks, and secondly I quote:
about WITH NOLOCK. It was struck not only by blocking, but by the fact that someone is not only seriously using this anathema, but also hopes that there will be no blocking.
Question: Is using WITH(NOLOCK)
evil? Is this evil absolute or not? When can its use be justified?