Usage notes

Run this command when a table has had many updates, or after reorganizing a table. The statistics updated by this task include number of records, number of pages, and average record length. The optimizer uses these statistics when determining access paths to the data.

After the command is run, note the following item:
  • A COMMIT must be issued to release the locks.
  • To allow new access plans to be generated, the packages that reference the target table must be rebound.

After statistics are updated, you can create new access paths to the table by rebinding the packages.

Collect statistics that apply only to the tables before you create indexes. By running the table statistics first, you ensure that the indexes statistics are not overlaid by table statistics.

For more information, see the RUNSTATS CLP command in the DB2® command reference information for the version of DB2 that you are using.