Method for concurrency control for a secondary index
AssigneeMySQL AB
InventorMikael Ronstrom
Life of this patent
Estimating the term…
Abstract
The present invention relates to a method and a computer program for concurrency control for a secondary index (13) wherein many deadlocks are avoided by means of a selective locking strategy and by means of allowing index records (14) of the secondary index to contain some keys to many but never too few. When keys are read from the secondary index (13) it is thus possible to read some keys that may be irrelevant. However, such irrelevant keys are sorted out by means of checking against the corresponding records (12) in the table (11) to which the secondary index (13) is associated. The selective locking strategy allows for increased concurrency.
Claims22
A method for concurrency control for a secondary index associated with a database table, which secondary index includes index records, wherein each index record contains a list of entries, which are unique keys each identifying a table record of the database table, which method involves performing index operations on the index records according to a locking strategy for locking the index records, wherein the method comprises:
- allowing the index operation of type Delete Index Entry to operate on an index record even when another index operation holds a lock on the index record, and
- performing the index operation of type Delete Index Entry such that an entry to be deleted from the index record is not removed from the index record until the index operation of type Delete Index Entry is committed.
A computer program product for a database management system, which computer program product comprises code means residing on a computer readable medium, wherein said code means are arranged to perform a method for concurrency control for a secondary index associated with a database table, which secondary index includes index records, wherein each index record contains a list of entries, which are unique keys each identifying a table record of the database table, which method involves performing index operations on the index records according to a locking strategy for locking the index records, when said computer program is executed by a computer of the database management system, wherein the method comprises:
- allowing the index operation of type Delete Index Entry to operate on an index record even when another index operation holds a lock on the index record, and
- performing the index operation of type Delete Index Entry such that an entry to be deleted from the index record is not removed from the index record until the index operation of type Delete Index Entry is committed.
Dependencies are inferred from the claim text.