Preventing inaccurate real-time statistics from non-Db2 utility operations

You can prevent non-Db2 utility operations from creating inaccurate real-time statistics.

About this task

Non-Db2 utilities do not affect real-time statistics. Therefore, an object that is the target of a non-Db2 COPY, LOAD, REBUILD, REORG, or RUNSTATS job can cause incorrect statistics to be inserted in the real-time statistics tables.

Procedure

To prevent non-Db2 utilities from creating inaccurate real-time statistics:

  1. Stop the table space or index that is the target of the utility operation.
    his action causes Db2 to write the in-memory statistics to the real-time statistics tables and initialize the in-memory counters. If Db2 cannot externalize the statistics, the STOP command does not fail.
  2. Invoke the utility operation.
  3. When the utility completes, update the statistics tables with new totals and timestamps, and insert zero values in the incremental counters.