Jump to content

Index locking

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Comps (talk | contribs) at 18:39, 14 April 2010 (Text completely modified, to make it as general as requested by the name.). 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 access user data. As user data is changing in a database (by insert, delete, or modify), also indexes go over changes to maintain user data access correct. Index locking is a procedure 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 transaction (not a user invoked transaction) may be invoked to maintain and modify an index. When a portion of index is locked by a transaction, other transactions may be blocked from accessing this index portion (blocked from reading or modifying, 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 widely researched are specialized techniques for B trees which are regularly utilized for database indexes.