RUNSTATS Commands in DB2

The RUNSTATS utility collects statistics about DB2 objects. These statistics can be stored in the DB2 catalog, and are used during the bind process by optimizer to choose the path in accessing data.

If you never use RUNSTATS and subsequently rebind your packages or plans DB2 will not have the information that it needs to choose the most efficient access path. This can result in unnecessary I/O operations and excessive processor consumption.

It also collects statistics used for space management.

Run RUNSTATS at least once against each table and its associated indexes, After a load, or after mass updates, inserts, deletes, or after REORG...