Set the SQL table-level lock threshold.
n is any nonnegative integer. The default value is 1000.
The LockThreshold parameter is the automatic lock escalation threshold. This is the number of inserts, updates, or deletes for a single table within a single transaction that will trigger a table-level lock when reached.
Consider this example: a process starts a transaction that inserts 2000 rows, where LockThreshold is set to 1000. After the 1001st row is inserted, the process attempts to acquire a table-level lock rather than continue to lock individual rows. This reduces the total number of locks to prevent the lock table from becoming too full.
Automatic lock escalation is intended to prevent overflow of the lock table. For further details, see the Modify Transaction Lock Threshold section of the “INSERT” reference page in InterSystems SQL Reference.
Changing This Parameter
On the SQL page of the Management Portal (System Administration > Configuration > SQL and Object Settings > SQL), in the Lock escalation threshold field, enter a number.
To set the desired value for LockThreshold from the Terminal, use the SetOption(“LockThreshold”)Opens in a new tab method of the %SYSTEM.SQL.UtilOpens in a new tab class. See the class reference for details.
You can also change LockThreshold with the Config.SQLOpens in a new tab class (as described in the class reference) or by editing the CPF in a text editor (as described in the Editing the Active CPF section of the “Introduction to the Configuration Parameter File” chapter in this book).