Jump to content

Index locking

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Rich Farmbrough (talk | contribs) at 06:59, 12 February 2011 (No longer unreferenced. using AWB). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In databases an index is a data structure, part of the database, utilized by a database system to effectively navigate access to user data. Index data are system data distinct from user data, and consist primarily of pointers. As user data are changing in a database (by insert, delete, or modify operations), also indexes go over changes to maintain user data access correct. Index locking is a technique utilized to maintain index integrity. A portion of an index is locked during a database transaction when this portion is being accesses by the transaction as a result of attempt to access related user data. Also special database system's transactions (not user invoked transactions) may be invoked to maintain and modify an index, as part of a system's self-maintenance activities. When a portion of index is locked by a transaction, other transactions may be blocked from accessing this index portion (blocked from modifying, and even from reading it, depending on lock type and needed operation).

Specialized concurrency control techniques exist for accessing indexes. These techniques depend on the index type, and take advantage of its structure. They are typically much more effective than applying to indexes common concurrency control methods applied to user data. Notable and have been widely researched are specialized techniques for B-trees (B-Tree concurrency control[1]) which are regularly utilized as database indexes.

Index locks are used to coordinate threads accessing indexes concurrently, and typically shorter-lived than the common transaction locks on user data. Often they are called in the professional literature latches[1].

See also

References

  1. ^ a b Goetz Graefe (2010): "A survey of B-tree locking techniques" ACM Transactions on Database Systems (TODS), Volume 35 Issue 3, July 2010 (also HPL-2010-9, HP Laboratories).