RUNSTATS gathers statistics about the data in table spaces and indexes and records the statistics in the Db2 catalog.
About this task
RUNSTATS statistics help Db2 determine access paths at bind time. Some of the options that can be set when specifying the RUNSTATS utility include:
Whether you want RUNSTATS to update the catalog
The application share level
Whether you want to generate a report
Note: You can use object profiles to set column-level RUNSTATS statistics for indexes or tables. Using the column-level statistics settings will override the settings in the RUNSTATS utility profile. Refer to the topic Specifying object-specific utility options for information about this feature.
When you specify to set RUNSTATS options, the panel that is shown in the following figure is
displayed:
Procedure
Set the Exception Rule field.
Set other fields on the panel as desired.
Refer to the help panel for detailed information about the fields on this panel.
If you want index statistics to be collected during the REBUILD INDEX, configure the type of
statistics to be collected as follows:
Enter A or P in the Index
field.
Enter Y in the Update statistics field and press
Enter.
On the Runstats Utility Column Statistics panel, follow the instructions in Setting RUNSTATS column statistics to complete configuring the statistics.