Locking Granularity and Lock Types
Locking granularity and lock types
Databases are usually organized hierarchically, with tablespaces containing tables, which in turn contain records. In multigranularity locking, this organization is exploited for a more efficient lock management by allowing transactions to lock objects of different granularities like tables or records. Thus, instead of locking each record of a table separately, a transaction can lock the complete table. To ensure a correct execution when transactions use different granularities for locking, additional lock modes are introduced to avoid non-serializable executions.
Transactions that acquire many locks on small items like records or pages incur a non-negligible performance and memory overhead for managing these locks. Such transactions can benefit from acquiring locks on coarser granules like tables or complete tablespaces, avoiding many fine-grained locks. However, concurrency may be lower due to an increased number of...
- 1.Gray J, Lorie RA, Putzolu GR, Traiger IL. Granularity of locks in a large shared data base. In: Proceedings of the 1st International Conference on Very Large Data Bases; 1975. p. 428–51.Google Scholar
- 2.Weikum G, Vossen G. Transactional information systems. San Francisco: Morgan Kaufman; 2002.Google Scholar