Collecting statistics by using statistics profiles

You can use statistics profiles to invoke the RUNSTATS utility with a predefined set of statistics collection options. Db2 also uses statistics profiles when you enable autonomic statistics maintenance.

Procedure

To collect statistics by using a statistics profile:

Issue the following RUNSTATS control statement:
RUNSTATS TABLESPACE ts-name TABLE table-name USE PROFILE

Results

Db2 collects statistics for the table specified by table-name according to the collection options that are specified in the profile, and issues a message to indicate that the profile was used.
If no profile exists for a target table, a default is used for the profile specification:
  • If no table name is specified, TABLE ALL INDEX ALL is used.
  • If a table name is specified, COLUMN ALL INDEX ALL is used.