![sql server nolock sql server nolock](https://i0.wp.com/tecloger.com/wp-content/uploads/2019/12/WITH-NOLOCK-Performance-Impact-tecloger.jpg)
It is a query hint that causes SQL to use the READ UNCOMMITTED isolation level for the table (or query) specified. It’s a useful setting, under the right circumstances.Ī number of DBAs and developers don’t realize that NOLOCK is basically an alias.
![sql server nolock sql server nolock](https://www.sqlshack.com/wp-content/uploads/2017/06/word-image-49.png)
NOLOCK has it’s uses and shouldn’t be completely restricted, just like it shouldn’t be used everywhere. I wouldn’t put either in production for exactly the opposite reason as the Cargo Cults.
![sql server nolock sql server nolock](https://www.alfintechcomputer.com/wp-content/uploads/2020/10/WITH-NOLOCK-IN-SQL-SERVER.jpg)
I wrote my posts in part as practice for the various technologies I used (ddl triggers and policy based management) and in part as catharsis for an obnoxious situation. What they did was make me realize that I want to clarify my stance on NOLOCK. And don’t get me wrong, I love comments, and I appreciated every single one. Recently I posted Tales of a DBA fed up with NOLOCK and I got a fair number of comments (at least for me). Cases where a group of IT professionals (developers and/or DBAs) have decided that NOLOCK (or whatever) made something go faster/work better and now use it everywhere without really understanding why it worked in the first place. Because frequently we see cargo cults develop around these technologies. Ever wonder why? For the same reason they shudder at shrink, MAXDOP of 1 and even occasionally at UDFs (user defined functions). Most senior DBAs I’ve met shudder when they hear NOLOCK.