Table lock promotion promotes locks from fine-grained locks to table locks. Partition
lock promotion promotes locks from fine-grained locks to partition locks.
For partition lock promotion to occur, set the partition lock promotion threshold to a
nonzero value.
Partition locks use the same semantics as table locks. Page or row locks belonging to a
partition under a single partition scan that exceeds its lock promotion threshold can
then trigger lock promotion to a partition lock.
When a page or row lock is acquired with an unknown partition, lock promotion to the
partition lock is completely disabled. In these situations, locks can only be promoted
to table level.
SAP ASE supports two different types of lock promotion:
- Row or page to table lock – if a task acquires locks within a single scan of a table
on as many number of rows or pages that exceed the table-level lock promotion
threshold, then SAP ASE tries to acquire shared table or exclusive table locks on
the corresponding table and replace all existing rows or pages in that table.
Table-level lock promotion is also triggered when row or page locks are acquired
with covering partition when the owning partition is not known for the lock
promotion.
- Row or page to partition lock – during partition lock promotion the appropriate
shared or exclusive partition lock is acquired and all of the fine-grained locks
acquired as part of the scan (or DML) and belonging to the partition are released.
- Partition lock promotion promotes shared fine-grained locks to shared
partition locks.
- Partition lock promotion promotes exclusive fine-grained locks to exclusive
partition locks.