Method and system for reduced lock contention in SQL transactions
    43.
    发明授权
    Method and system for reduced lock contention in SQL transactions 失效
    在SQL事务中减少锁争用的方法和系统

    公开(公告)号:US07080074B2

    公开(公告)日:2006-07-18

    申请号:US10010371

    申请日:2001-11-05

    IPC分类号: G06F17/30

    摘要: According to the method, apparatus, and computer readable medium of the present invention, a scan is performed by accessing all rows of a table in a relational database, evaluating each row to determine whether the row satifies a set of predicates of a database query, and returning the row if it satisfies the set of predicates. According to a preferred embodiment of the present invention, all rows are evaluated regardless of current locks. The scan is continued if the row does not satisfy the set of predicates regardless of the current lock on the row. The locking semantics according to the invention has the advantage that it completely removes the problem of lock contention on the rows that do not satisfy statement predicates.

    摘要翻译: 根据本发明的方法,装置和计算机可读介质,通过访问关系数据库中的表的所有行来执行扫描,评估每行以确定该行是否满足数据库查询的一组谓词, 并返回该行,如果它满足一组谓词。 根据本发明的优选实施例,无论当前的锁如何,都对所有行进行评估。 如果该行不满足该组谓词,而不考虑行上的当前锁定,则继续进行扫描。 根据本发明的锁定语义的优点在于它完全消除了对不满足语句谓词的行的锁争用的问题。

    System and method for avoiding deadlock situations due to pseudo-deleted entries
    44.
    发明授权
    System and method for avoiding deadlock situations due to pseudo-deleted entries 失效
    用于避免由于伪删除条目引起的死锁情况的系统和方法

    公开(公告)号:US06944615B2

    公开(公告)日:2005-09-13

    申请号:US09894090

    申请日:2001-06-28

    IPC分类号: G06F17/30

    摘要: In a database management system (DBMS) (60) for a database application (10) including a database (12) having a table (14, 16, 18) and a unique key index (42) having indexes (44, 46, 48) therefor, the DBMS (60) includes a data manager (64), an index manager (66), a transaction manager (62), and a lock manager (68) which restricts access to the table by assigning locks to elements thereof. In order to avoid deadlock in the database application due to the pseudo-deleted entries, the lock categories include an X-lock and a Conditional S-lock, and have lock attributes including at least a Delete attribute for the X-lock. The Conditional S-lock is compatible (granted by the lock manager) with an X-lock whose Delete attribute is NOT SET, but is not compatible (granted) with an X-lock whose Delete attribute is SET. Each index entry includes a pseudo-delete flag which is SET by the index manager (66) to indicate deletion of the indexed row. Conditional upon locating a pseudo-deleted index key corresponding to a key to be added to the index, the index manager (66) requests a Conditional S-lock on the row indexed thereby, whereby the index manager (66) verifies the Delete transaction which set the pseudo-delete flag has committed.

    摘要翻译: 在数据库应用程序(10)的数据库管理系统(DBMS)(60)中,包括具有表(14,16,18)的数据库(12)和具有索引(44,46,48)的唯一键索引(42) )为此,DBMS(60)包括数据管理器(64),索引管理器(66),事务管理器(62)和锁管理器(68),其通过向其元素分配锁限制对表的访问。 为了避免由于伪删除的条目而导致数据库应用程序中的死锁,锁类别包括X锁和条件S锁,并且具有至少包含X锁的Delete属性的锁属性。 条件S锁与X锁定(其Delete属性未设置)兼容,但与Delete属性为SET的X锁不兼容(授予)。 每个索引条目包括由索引管理器(66)设置为指示删除索引行的伪删除标志。 有条件的是,索引管理器(66)根据与要添加到索引的密钥相对应的伪删除的索引密钥来定位索引的行上的条件S锁定,由此索引管理器(66)验证删除事务, 设置伪删除标志已经提交。