none
Granularity of table locking hints? RRS feed

  • Question

  • I couln't find any information on the granularity of table locking hints like HOLDLOCK and UPDLOCK.

    What is the default granularity of these table hints (without adding ROWLOCK, PAGLOCK, TABLOCK etc. to the table hint clause)?

    Thanks for enlightening me!


    Vote here for a Microsoft Connect feedback channel on Windows - and win a better Windows!

    • Edited by BetterToday Monday, October 10, 2011 7:41 PM
    Monday, October 10, 2011 7:41 PM

Answers

  • The default is the same as when you don't specify any hint at all. That is, the optimizer/lock manager decides what is the best. That, typically that is a row lock. Although keep in mind that serializable isolation (i.e. HOLDLOCK) result in range locks rather than row locks.


    Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
    • Marked as answer by BetterToday Monday, October 10, 2011 10:47 PM
    Monday, October 10, 2011 8:35 PM