What is the difference between a lock and a latch in the context of concurrent access to a database?

前端 未结 8 1647
别跟我提以往
别跟我提以往 2021-01-30 06:46

I am trying to understand a paper on concurrent B-tree, in which the author mentioned latch vs lock, and how latches do not need a \"Lock Manager\". I have been trying to figure

8条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-30 07:30

    The different between Locks and Latches:

    Reference taken from this blog.

    Locks ensure that same record cannot be modified by two different connections and Latches ensure that record resides in a proper data page for further reading and writing operation.

    Locks provide a consistency of logical transaction and Latches provide a consistency of the memory area.

    The DBA can control and manage database locks by applying different Isolation Levels and for Latches, DBA doesn’t have any control because it’s managed by the SQL Server.

提交回复
热议问题