Locking on Table with covering non clustered index

  • Hi

    a quick question (I hope) about locking.  Please presume a default Read Committed isolation level for this question.

    If I have a covering non-clustered index will a select statement on it block an insert on the clustered index?

    Cheers

    Alex

  • No, it won't

    but the Insert/update will try to obtain an exclusive lock on the index in order to update it as well.

  • So presumably the insert will be unable to complete until the SELECT has release its shared lock on the index

  • alex.palmer - Wednesday, March 22, 2017 3:23 AM

    So presumably the insert will be unable to complete until the SELECT has release its shared lock on the index

    Correct.

    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 4 posts - 1 through 3 (of 3 total)

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