Collecting statistics using a statistics profile

The RUNSTATS utility provides the option to register and use a statistics profile, which specifies the type of statistics that are to be collected for a particular table; for example, table statistics, index statistics, or distribution statistics. This feature simplifies statistics collection by enabling you to store RUNSTATS options for convenient future use.

To register a profile and collect statistics at the same time, issue the RUNSTATS command with the SET PROFILE parameter. To register a profile only, issue the RUNSTATS command with the SET PROFILE ONLY parameter. To collect statistics using a profile that was already registered, issue the RUNSTATS command with the USE PROFILE parameter.

To see what options are currently specified in the statistics profile for a particular table, query the SYSCAT.TABLES catalog view. For example: