Avoid repetitive use of NOLOCK hints in a query by specifying the isolation level


The main usage of NOLOCK hint is

1) To avoid Select statements being blocked until open transactions are committed
2) Read Uncommited data (dirty read)

In your stored procedures, if you have several Select queries to be executed and we want to use NOLOCK hint to gain

performance (fast output) you may need to repeat the usage of WITH (NOLOCK) for all queries.

You can avoid this repetitive use of NOLOCK hints in a query by specifying the isolation level.


SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; -- turn it on

    ...several queries

SET TRANSACTION ISOLATION LEVEL READ COMMITTED; -- turn it off