Does a shared table lock block updates if using read commited?

  • Read committed says that it will allow updates using exclusive locks when the read shared lock is done reading the data.  I'm assuming that they mean they release the shared lock at the page level.  What happens if SQL Server escalates the lock from the page level to a table lock?  Does this mean that any updates have to wait until the read finishes; in my case selecting all of the rows?

    Thanks,

    Laura

  • Yes I believe So. If your read escalates to table level lock, then any update on that data has to wait until the locks are realesed.

    Bear in mind that once if sql decides to escalte lock then it will be always table level lock. In theory we should avoid getting any lock escalation.

  • Thanks a bunch.  That's what my testing was showing, but I wanted to get a second opinion before I provided my research to my manager.

    Laura

     

Viewing 3 posts - 1 through 2 (of 2 total)

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