Many factors affect the amount of processor resources that Db2 consumes.
Procedure
To reduce the consumption of processor resources by Db2:
- Cache authorizations for plans, packages, and routines,
such as user-defined functions and stored procedures.
- Use an isolation level of cursor stability and CURRENTDATA(NO)
to allow lock avoidance.
- Use the LOCKSIZE clause, when you create or alter a table
space.
Doing so avoids using excess granularity for locking,
such as row-level locking.
- Reorganize indexes and table spaces to improve the performance
of access paths.
Reorganizing indexes and table spaces
is also important after table definition changes, such as changing
the data type of a column, so that the data is converted to its new
definition. Otherwise, Db2 must
track the data and apply the changes as the data is accessed.
- Ensure that your access paths are effective by:
- Creating only necessary indexes
- Updating statistics regularly
- Rebinding as necessary