NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
L-45
Lock Duration
The following table lists SQL operations that release locks and shows the effects of
STABLE and REPEATABLE access mode on lock duration. The table assumes default
locking (shared locks for reads and exclusive locks for updates) and also assumes the
locking strategy uses the minimum number of locks. SQL can use additional locks
(either row locks or table locks) if it determines that additional locks are necessary to
protect data integrity or to provide faster data access.
If a partitioned table is randomly accessed with STABLE ACCESS, the lock is held until
the next access to the same partition (not the next access to the table). This can cause a
lock to be held longer than expected.
When using sequential access with Sequential Block Buffering and STABLE access,
SQL holds the lock until it attempts to access a row that is not in the buffer. Thus, rows
at the beginning of the buffer remain locked while subsequent rows are being fetched by
the program.