Skip to main content
Previous sectionNext section


Set the SQL lock threshold.


[SQL]    LockThreshold=n

n is any nonnegative integer. The default value is 1000.


The value n is the lock 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. For example, if the lock threshold is 1000 and a process starts a transaction and then inserts 2000 rows, after the 1001st row is inserted the process will attempt to acquire a table-level lock instead of continue to lock individual rows. This is to help keep the lock table from becoming too full.

For further details, see the Transaction Locking 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”) method of the %SYSTEM.SQL.Util class. See the class reference for details.

You can also change LockThreshold with the Config.SQL 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).