SAPDBA: DB Optimizer Control 

Use

Use the CCMS for checking and updating statistics for the Oracle cost-based optimizer (CBO).

The SAPDBA menu option DB Optimizer control (SAPDBA menu Additional functions) is another way of displaying statistical information, checking the requirements for new statistics in online mode, deleting superfluous statistics, and creating missing statistics.

Features

Displaying Existing Statistics

Function: Show all statistics information

This display tells you how many tables or indexes of the user SAPR3 have no statistics, and how many tables entered in the control tables DBSTATC have obsolete statistics (TODO indicator in DBSTATC).

It also gives you information about the number of tables entered in control table DBSTATC, the number of tables explicitly excluded from the statistics (Active = N), the number of tables and indexes excluded from the CBO statistics (Active = R or N), and the number of tables that are marked with a customer indicator in the control table (..user defined values).

Checking Which Tables Need New Statistics

Function: Check for new statistics

a

Delta (percent) for new stat. indicator

b

Forced check (refresh marked tables)

c

Time limitation

d

SAPR3 Table (for option g)

e

Tablespace (for option h)

f

Start check for tables in control table DBSTATC

g

Start check for table

h

Start check for tables in tablespace

You can use this check either for a single table, for all the tables of a certain tablespace, or for all the tables of the control table. You can specify the threshold for the percentage change in table records from which the statistics are considered obsolete (menu option a). You can also restrict the check to a certain period of time (menu option c). However, you should not normally set a time limit.
A Forced check (menu option b) updates the entries in the control table, independently of the current status; this means that all existing TODO indicators are reset.

Deleting Unnecessary Statistics

Function: Delete statistics excluded for R/3

Deletion of tables not required for the R/3 System, for example pool and cluster tables or tables marked as such in the control table DBSTATC (Active = N or R).

Creating Missing Statistics

Function: Create missing statistics for all tables and indexes

When, for example, you add one or more new tables or indexes, you can easily create statistics for them using this menu option.

For more information about the standard procedure for updating statistics, see CCMS Support for the Cost-Based Optimizer.