DBMS_STATS module

The DBMS_STATS module updates statistics about the characteristics of columns, indexes, or tables in the system catalog, for example, the number of records and pages, and the average record length. The optimizer uses these statistics when it determines the access paths to the data.

The schema for this module is SYSIBMADM.

The DBMS_STATS module includes the following routines. The routines are listed in alphabetical order.

Table 1. Built-in routines available in the DBMS_STATS module
Routine Name Description
CREATE_STAT_TABLE procedure Creates a table where statistics are stored.
DELETE_COLUMN_STATS procedure Deletes column statistics from the system catalog or from specified statistic tables.
DELETE_INDEX_STATS procedure Deletes index statistics from the system catalog or from specified statistic tables.
DELETE_TABLE_STATS procedure Deletes table statistics from the system catalog or from specified statistic tables.
GATHER_INDEX_STATS procedure Collects index statistics that are stored in the system catalog or in specified statistic tables.
GATHER_SCHEMA_STATS procedure Collects schema statistics that are stored in the system catalog or in specified statistic tables.
GATHER_TABLE_STATS procedure Collects table statistics that are stored in the system catalog or in specified statistic tables.
GET_COLUMN_STATS procedure Retrieves column statistics from the system catalog or from specified statistic tables.
GET_INDEX_STATS procedure Retrieves index statistics from the system catalog or from specified statistic tables.
GET_TABLE_STATS procedure Retrieves table statistics from the system catalog or from specified statistic tables.
SET_COLUMN_STATS procedure Sets column statistics from the system catalog or from specified statistic tables.
SET_INDEX_STATS procedure Sets user-provided statistics for the index.
SET_TABLE_STATS procedure Sets user-provided statistics for the table.