Specifying the maximum number of locks that a process can hold on a table space

You can specify the LOCKMAX clause of the CREATE and ALTER TABLESPACE statements for tables of user data and also for tables in the Db2 catalog, by using ALTER TABLESPACE.

About this task

Refer to the description of the LOCKMAX clause in CREATE TABLESPACE or the ALTER TABLESPACE for information about valid values.

Catalog record: Column LOCKMAX of table SYSIBM.SYSTABLESPACE.

Begin program-specific programming interface information.

Procedure

Use one of the following approaches if you do not use the default value:

  • Base your choice upon the results of monitoring applications that use the table space.
  • Aim to set the maximum number of locks high enough that, when lock escalation occurs, one application already holds so many locks that it significantly interferes with others.
    For example, if an application holds half a million locks on a table with a million rows, it probably already locks out most other applications. Yet lock escalation can prevent it from potentially acquiring another half a million locks.
  • If you alter a table space from LOCKSIZE PAGE or LOCKSIZE ANY to LOCKSIZE ROW, consider increasing the value of LOCKMAX to allow for the increased number of locks that applications might require.
    End program-specific programming interface information.