Home Forums SQL Server 2008 T-SQL (SS2K8) DIFFERENCE BETWEEN NOLOCK VS WITH(NOLOCK) IN SQL SERVER 2008 RE: DIFFERENCE BETWEEN NOLOCK VS WITH(NOLOCK) IN SQL SERVER 2008

  • homebrew01 (1/10/2014)


    GilaMonster (1/10/2014)


    No, it's an unnecessary use. If the data is static during the day then there aren't going to be any X locks around to block the reports and so adding nolock is a waste of typing

    So am I mis-remembering situations in which long running read-only queries have caused blocking of other read-only queries ?

    Read queries take shared locks (unless someone's been messing with locking hints). Shared locks never block other shared locks.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass