You can use database statistics to improve performance. You can
use the workbench to update and view statistics for supported data objects.
It is useful to update statistics on data objects in the following scenarios:
- When data is loaded into a table and the appropriate indexes are created.
- When you create a new index on a table. You only need to update statistics
for the new index if the table has not been modified since you last updated
statistics for the table.
- When you reorganize a table with the REORG utility.
- When you use the REDISTRIBUTE DATABASE PARTITION GROUP utility.
- When the table and its indexes are extensively updated by data modifications,
deletions, and insertions. For example, if 10 to 20 percent of the table and
index data has been affected.
- Before binding application programs whose performance is critical.
- When you want to compare current and previous statistics. If you update
statistics at regular intervals, you can discover performance problems early.
- When the prefetch quantity is changed.
Tip: Statistics information is also displayed in the Data Source
Explorer as a label decorator. The table row count decorator in the Data Source
Explorer displays the date at which statistics were last collected for a table,
and the number of rows in the table at that time. If statistics are not found
for a table for which the product supports statistics, a value of "-1" is
displayed instead. For a table for which the product does not support statistics,
no table row count decorator is displayed.