ALLOW_PAGE_LOCKS vs DEADLOCKS vs REBUILD INDEXES

  • Hi,

    I would like to know if there is a link between any of these 3 things.

    Specifically the following:

    1. If the index's ALLOW_PAGE_LOCKS is ON, can this lead to more deadlocks?

    2. Will setting ALLOW_PAGE_LOCKS to OFF reduce the number of deadlocks?

    3. If the index's ALLOW_PAGE_LOCKS is OFF, can I still rebuild the index?

    4. Does the ALLOW_PAGE_LOCKS value have any affect on the rebuilding of indexes?

    Please help with these 4 questions..

    Thanks!

  • ALLOW_PAGE_LOCKS can but may not lead you to deadlocks. However if you have a very busy OLTP system, page level locks hits concurrency. But remember, if you disable this there will be more number of locks for SQl server to handle this also can lead total slowdown of system.

    ALLOW_PAGE_LOCKS will not affect rebuild (which is essentially drop and create), but you cannot reorganize the index

    http://msdn.microsoft.com/en-us/library/ms188388.aspx

    ----------------------------------------------------------------------------------------------------------------------------------------------------
    Roshan Joe

    Jeff Moden -Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • Thank you for your info.

    Another thing I was wondering about is this:

    Will running Rebuilding indexes maintenance plan, decrease the number of deadlocks by any chance?

  • Will running Rebuilding indexes maintenance plan, decrease the number of deadlocks by any chance?

    Rebuilding index will removes index fragmentation. Fragmentation affects performance. Anything you do to speed up your queries will indirectly help you in terms of deadlocks. But most of the time you need to check isolation level, transaction order across procedures etc, and use appropriate lock hints.

    ----------------------------------------------------------------------------------------------------------------------------------------------------
    Roshan Joe

    Jeff Moden -Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • The option ALLOW_PAGE_LOCKS = OFF will help to avoid parallel query deadlock on rebuild index.

  • Please note: 5 year old thread.

    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

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply