IT lexicon › Database › Intent Lock

Intent Lock

Database På svenska → Updated: 2026-11-11

A locking mechanism signaling the intention to lock resources at a finer level — without actually locking them yet.

A database has a hierarchy of lockable resources: table → page → row. A transaction wants to read a row. Before locking the row, it informs the table: "I intend to read." Another transaction wanting something drastic — like restructuring the table — sees intent locks and waits. Intent locks come in two flavors: intent-read (IRL) and intent-write (IWL), compatible with each other but not with exclusive table locks. The system needn't lock millions of rows — just declare "locks are coming on this table." It's an optimization of two-phase locking, reducing memory overhead at scale.

← Back to the lexicon