Important We are integrating BMC AMI LOBMaster technology into the BMC AMI Reorg product and discontinuing BMC AMI LOBMaster as a separate product. For the latest integrated documentation, see BMC AMI Reorg for Db2 13.1.

+RUNSTATS


The +RUNSTATS parameter activates statistics gathering and updates the Db2 catalog.

You can use this parameter in RRGPARMS DD for REORG TABLESPACE and for REORG INDEX. The RRGPARMS DD value is applied if BMC AMI Utility Manager creates a REORG INDEX statement.


RUNSTATS.png

NO

(Default) BMC AMI Reorg does not update the statistics.

YES

BMC AMI Reorg updates the statistics according to the STTPARMS. The STTPARMS DD is the location in which the parameters for BMC AMI Stats for Db2 are specified. For more information, see Overview of BMC AMI Stats.

ALL

Same as YES

BMC AMI Reorg updates all statistics, including the history tables.

HST

Same as YES

BMC AMI Reorg updates all statistics, including the history tables.


Important

For the rules that apply to parameter syntax, see Parameter syntax rules.

Restrictions

The +RUNSTATS parameter is subject to the following restrictions:

  • This parameter computes aggregate statistics using catalog values for partitions that are not processed. To ensure that meaningful values are computed when processing a subset of a partitioned table space, you must run BMC AMI Stats on the entire table space when, or immediately after, the table space has loaded to collect statistics for all partitions.
  • BMC AMI Reorg does not collect statistics for non-indexed tables.
  • The statistics that BMC AMI Reorg gathers update SYSCOLUMNS for the first column only of each index. Run BMC AMI Stats to obtain statistics for all columns of all indexes.


Important

For partitioned table spaces, BMC AMI Reorg does not update table statistics unless there is an index on the partitioning columns or there is a DPSI defined.


Example
+RUNSTATS(YES)

BMC AMI Reorg gathers statistics and updates the Db2 catalog with the new values.

Important

BMC AMI Utilities always gather KEYCARD statistics when any statistics are requested.

Additional considerations

Column grouping (COLGROUP) statistics are updated for every column combination of every index. Frequency distributed statistics can also be collected. Frequency statistics collection is controlled by the BMC AMI Stats parameters in the STTPARMS DD. If the STTPARMS DD is not supplying these parameters in the reorganization job, BMC AMI Reorg obtains them from the BMC AMI Utilities configuration.

For a list of the Db2 catalog statistics that are updated, see BMC AMI Stats for Db2 documentation.

Example
RRGPARMS    DD *
  +RUNSTATS(YES)
STTPARMS    DD *
  +FREQ(MOST)
  +NUMCOLS(4)
  +COUNT(2)

BMC AMI Reorg gathers column frequency distributed statistics.


Important

If one of the indexes has only three columns, frequency statistics is gathered for that group of three columns.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*