Monitoring catalog statistics
You can improve access path selection for SQL statements by monitoring the health of statistics for database objects. The health of these statistics is of critical importance for efficient access paths for SQL statements.
About this task
Db2 uses a cost-based optimizer, which makes decisions based
on the statistics that are available for the tables and indexes. When accurate statistics are not
available for database objects, the cost estimates that Db2
relies on for choosing the most efficient access path become incorrect.
Procedure
To monitor the health of statistics for database objects, use one or more of the following approaches:
What to do next
- Run the REORG utility to reorganize the data.
- Run the RUNSTATS utility to collect accurate statistics for database objects.
- Rebind the applications that use static SQL statements so that Db2 can choose the most efficient access paths.