WITH (NOLOCK) vs SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED

前端 未结 6 591
天涯浪人
天涯浪人 2020-12-04 06:08

Could someone give me some guidance on when I should use WITH (NOLOCK) as opposed to SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED

What

6条回答
  •  攒了一身酷
    2020-12-04 06:38

    • NOLOCK is local to the table (or views etc)
    • READ UNCOMMITTED is per session/connection

    As for guidelines... a random search from StackOverflow and the electric interweb...

    • Is the NOLOCK (Sql Server hint) bad practice?
    • When is it appropriate to use NOLOCK?
    • Get rid of those NOLOCK hints…

提交回复
热议问题