Statistics collection
The RUNSTATS option on the COPY command provides the opportunity to update space level statistics in the Db2 catalog and in the DASD MANAGER PLUS BMCSTATS tables while making an image copy of the space.
Gathering and updating these statistics while running an image copy will increase the CPU time used during the BMC AMI Copy run, but has the following advantages:
- Requires no additional elapsed time for the copy
- Uses a fraction of the CPU required by the stand-alone IBM RUNSTATS utility
- Does not impact the availability of the space (no outage beyond the copy job itself)
The amount of CPU time used for RUNSTATS will be variable, depending on the number of rows in the space and holes in the pages. See RUNSTATS for more information about this option.
Set the INVCACHE option on the OPTIONS command or in the installation options (OPTIONS-syntax-option-description and INVCACHE=NO) to YES to have the dynamic SQL cache invalidated after the statistics are updated. Setting INVCACHE to YES causes the Db2 optimizer to pick up the new information the next time the SQL statement is executed.
The NACTIVE option on the COPY command (NACTIVE) allows you to specify that you want BMC AMI Copy to update and collect statistics for only the NACTIVE column of SYSIBM.SYSTABLESPACE. This is done in combination with the production of image copies. To calculate NACTIVE statistics, BMC AMI Copy uses the number of pages copied, which may or may not match the value calculated by RUNSTATS. NACTIVE statistics are reported in SYSPRINT. If only this statistic is needed, using NACTIVE YES uses less CPU time than collecting all statistics.