Updating Table Space Statistics

Use the Table Space Statistics window to run utility RUNSTATS against a table space. You can gather summary information about the characteristics of data in table spaces, indexes and partitions. The output is recorded in the DB2 for OS/390 catalog tables. DB2 uses this information to select access paths to data during the bind process. The information is available to the database administrator for evaluating database design and to aid in determining when table spaces or indexes must be reorganized.

Authorities and privileges

To gather table space statistics:

  1. Open the Table Space Statistics window.

  2. From the Options page, define the options to use with RUNSTATS.

  3. From the Tables page you can specify the table for which column information is to be gathered. All tables must belong to the current table space.

  4. From the Indexes page, you can specify the indexes for which information is to be gathered.

  5. Click OK to run the statistics utility.

Define the RUNSTATS options

These steps are part of the larger task of RUNSTATS. When you complete the steps for defining the options, return to the main Table Space Statistics.

To define the options:

  1. For partitioned table spaces only, at the Select partitions radio buttons, specify to gather statistics on all partitions, or a single partition. If you want statistics on only a single partition, specify the partiion number in the field.
  2. At the Share level radio buttons, decide on the access that other programs can use on the table space while RUNSTATS is running.

  3. At the Report statistics radio buttons, specify if a set of messages is generated to report the collected statistics. Specify Yes if you want the set of mesages output to the SYSPRINT data set. The default is that no messages are sent to SYSPRINT.

  4. Specify one of the Update options on catalog tables radio buttons to decide whether the collected statistics are inserted into the catalog tables:

    Access path and space statistics
    The utility updates all the statistics in the DB2 catalog.
    Access path statistics only
    The utility updates only the catalog table columns used for access path selection.
    Space statistics only
    The utility updates only the catalog table colums that help a database administrator assess the status of a particular table space or index.
    Do not update catalog tables
    The utility does not update any catalog statistics. This is only valid if Report Statistics radio button is YES.

[Return to main task ]

Specifying tables for which column information is to be gathered

These steps are part of the larger task of RUNSTATS. When you complete the steps for defining the tables, return to the main Table Space Statistics.

To define the tables:

  1. Select the Collect statistics on tables to enable the table options on this page.

  2. Specify to collect statistics on all columns in all tables in the table space, or on one or more individual tables.

  3. Click the Add push button to open the Add table options window to add table and column information on which to run statistics.

  4. Select a table from the Table options list. Click the Change push button to open the Change table options window to change table and column information on which to run statistics

  5. Click Remove to delete a table from the list.

[Return to main task ]

Specifying indexes for which column information is to be gathered

These steps are part of the larger task of RUNSTATS. When you complete the steps for defining the indexes, return to the main Table Space Statistics.

To define the indexes:

  1. Select the Collect statistics on indexes to enable the index options on this page.

  2. Specify to collect statistics on all columns in all indexes in the table space, or on one or more individual indexes.

  3. Click the Add push button to open the Add index options window to add column information on which to run statistics.

  4. Select an index from the Index options list. Click the Change push button to open the Change index options window to change column information on which to run statistics

  5. Click Remove to delete a table from the list.

[Return to main task ]