SQL Server Performance

WITH (NOLOCK) statement

Discussion in 'Getting Started' started by tonyliu322, Jan 16, 2008.

  1. tonyliu322 New Member

    the database is used for reporting purpose, and there are lots of query (select) run again the database, just wonder if the WITH (NOLOCK) statement would help improving the performance?
  2. Luis Martin Moderator

    Kindly don't duplicate post. I've deleted the other one.
    If you need exclusive select (means no one can update, insert, etc.) you don't need noclock. Otherwise you can use it.
  3. ScottPletcher New Member

    Yes. Or better yet, make the database read-only except when it is actually being modified, as that will reduce overhead even more.
    SELECTing on an updateable (not read-only) table still takes shared locks.

Share This Page