March 22, 2017 at 2:48 am
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
March 22, 2017 at 3:16 am
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.
March 22, 2017 at 3:23 am
So presumably the insert will be unable to complete until the SELECT has release its shared lock on the index
March 22, 2017 at 4:05 am
alex.palmer - Wednesday, March 22, 2017 3:23 AMSo 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
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply