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:
-
Open the Table Space Statistics window.
- From the Options page, define the options to use with RUNSTATS.
- 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.
- From the Indexes page, you can specify the indexes for which information is to be gathered.
-
Click OK to run the statistics utility.
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:
- 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.
- At the Share level radio buttons, decide on
the access that other programs can use on the table space while RUNSTATS is running.
- Specify the Reference only radio button if you want to allow
only read-only access by other programs. This is the default.
- Specify the Allow changes radio button if you want to allow
other programs to change the table space or index. Uncommitted data
can be collected into statistical summaries.
- 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.
- 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 ]
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:
-
Select the Collect statistics on tables to enable the table
options on this page.
- Specify to collect statistics on all columns in
all tables in the table space, or on one or more individual tables.
- Click the Add push button to open the Add table options
window to add table and
column information on which to run statistics.
- 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
- Click Remove to delete a table from the list.
[Return to main task ]
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:
-
Select the Collect statistics on indexes to enable the index
options on this page.
- Specify to collect statistics on all columns in all indexes
in the table space, or on one or more individual indexes.
- Click the Add push button to open the Add index options window
to add column information on which to run statistics.
- 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
- Click Remove to delete a table from the list.
[Return to main task ]