Jump to content

Index locking

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Pinktulip (talk | contribs) at 14:02, 28 January 2006. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

You must add a |reason= parameter to this Cleanup template – replace it with {{Cleanup|June 2005|reason=<Fill reason here>}}, or remove the Cleanup template.

Index locking

Index locking blocks all access by other tasks to the entire table in a database. With index locking you may want to lock the index build for a column, not just the data items themselves

The circumstances where it is necessary to index lock include:

  • Adding a new level to the root page
  • Shrinking the root page
  • Splitting or shrinking the immediate child of the root page, causing an update on the root page

Circumstances where it is not necessary to Index lock include where:

  • You have small tables with index levels no higher than 3.
  • You envision possible modifications to the root page of an index

An example of doing an aggregate function(sum of salary field)

  • update happens along the way
  • result depends on the order of interleaving
  • best to lock the index as well as the record.