Home Forums SQL Server 2008 T-SQL (SS2K8) Is there a way to improve this SELECT statement for performance? RE: Is there a way to improve this SELECT statement for performance?

  • Sean Lange (8/30/2013)


    ScottPletcher (8/30/2013)


    NOLOCK can be useful, for example, for code lookup tables, such as state code lookups. A state hasn't been added since 1959, I think I'll risk it :-).

    And a table with 50 rows that hasn't been updated since 1959 is likely to encounter locking???

    No, but ANY locking ADDS OVERHEAD. Avoiding the locking thus reduces overhead.

    I don't know why so many want to deny that: THAT'S the main reason NOLOCK is available, to allow one to reduce locking overhead.

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".