• If you are doing aggregation queries, where the consistency of the result is not critical, you should make NOLOCK your default choice. Also make NOLOCK your default choice when querying static data, as there is no need to get SQL to do more work then required. This often means that data warehouse (BI) queries are often a good candidate for NOLOCK.

    If you are doing queries against operational data (e.g. checking quantity in stock before promising delivery) then you need the protection of locking, otherwise you may make the wrong business decision. This means that OLTP type queries normally do not have NOLOCK or the application uses some form of optimistic update logic to handle the integrity issues. Even with OLTP applications, static data queries can use NOLOCK.

    Original author: https://github.com/SQL-FineBuild/Common/wiki/ 1-click install and best practice configuration of SQL Server 2019, 2017 2016, 2014, 2012, 2008 R2, 2008 and 2005.

    When I give food to the poor they call me a saint. When I ask why they are poor they call me a communist - Archbishop Hélder Câmara