Controlling the collection of statistics feedback
Db2 collects data about missing or conflicting statistics to certain catalog and EXPLAIN tables, for use by SQL optimization tools.
About this task
When Db2 selects the access path for a SQL statement, it identifies missing or conflicting statistics values that might, if collected, improve the chances for selection of an efficient access path. Db2 holds this statistics feedback data in memory until an interval that you specify, and then collects the data in the SYSIBM.SYSSTATFEEDBACK catalog table. When you use certain methods to capture access path information for SQL statements into EXPLAIN tables, Db2 collects similar information in the DSN_STAT_FEEDBACK table, if it exists.
The statistics feedback data is collected only for EXPLAIN operations that use the access path selection process. For example, no statistics data is collected if you issue EXPLAIN statements with the PACKAGE or STMTCACHE options. In those cases, Db2 extracts previously selected access path information instead of using the access path selection process.
Certain SQL optimization tools can use this data to help you improve access path selection for SQL statements.
When the RUNSTATS utility collects the recommended statistics, it removes the recommendation rows from the SYSIBM.SYSSTATFEEDBACK catalog table.
Procedure
To control the collection of statistics feedback data, use the following approaches: