NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
L-48
LOCKLENGTH File Attribute
COMMIT WORK
FREE RESOURCES
ROLLBACK WORK
If you specify AUDITONLY, the process releases locks on audited objects only. You can
use this option if you want to hold locks on nonaudited objects throughout a series of
transactions.
Stopping or abnormal termination of a process frees any locks the process holds on
nonaudited tables. CLOSE and FREE RESOURCES release locks on nonaudited tables.
LOCKLENGTH File Attribute
LOCKLENGTH is a Guardian file attribute that specifies the number of leading bytes
used to identify rows for generic locking. LOCKLENGTH applies to key-sequenced
tables and indexes.
num-bytes
is an integer between 0 and the number of bytes in the key that specifies the number
of leading bytes in the primary or clustering key (including SYSKEY if it exists) to
use to identify rows for generic locking.
LOCKLENGTH 0 (the default) indicates that the entire length of the primary or
clustering key should be used.
Considerations—LOCKLENGTH
Increasing LOCKLENGTH increases lock granularity, reducing the number of locks
issued and the amount of lock escalation. Reducing the number of locks improves
performance but reduces concurrency, because one lock controls a larger group of
rows.
Examples—LOCKLENGTH
The following example creates a table with a LOCKLENGTH that fits the first
column of a two-column key. Each row represents part of an order, and the first
column is the order number. When order-processing applications access the table,
LOCKLENGTH num-bytes