Administration Getting Started
Statistics describe the physical and logical characteristics of a
table and its indexes. You must collect table and index statistics
periodically for each table. These statistics are used by DB2 to determine a
good way to access the data. If the data has changed significantly, to the
extent that the information last collected no longer reflects the actual table
data, then performance may begin to deteriorate when users are accessing
data.
You should re-bind application programs that use static SQL after
collecting statistics, because the SQL optimizer may choose a different access plan given
the new statistics. In particular, you should re-bind those programs that
reference tables for which new statistics are available. See the Quick Beginnings for your platform for instructions on binding application
programs.
To collect statistics for tables and indexes together:
- Open the Run Statistics window:
- From the Control Center, expand the object tree until you find the
Tables folder.
- Click on the Tables folder. Any existing tables are displayed
on the right side of the window (the contents pane).
- Click mouse button 2 on the table you want, and select Run
Statistics from the pop-up menu. The Run Statistics window opens.
- Specify the level of statistics you want to gather for the table, by
selecting a radio button under Statistics for the table.
- Specify the level of statistics you want to gather for the table's
indexes, by selecting a radio button under Statistics for the
indexes.
- Use the Share level radio buttons to specify the type of access
you want other users to have to the table while the statistics are being
collected:
- Change = Read and write access
- Reference = Read-only access
- Click on OK to begin collecting statistics.
Additional options exist. See the online help accessible from the
Run Statistics window.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]
[ DB2 List of Books |
Search the DB2 Books ]