Entering content frameProcedure documentation Updating Statistics using Optimizer Control with SAPDBA Locate the document in its SAP Library structure

Use

With this procedure you can display statistical information, check the requirements for new statistics, delete superfluous statistics, and create missing statistics for the Oracle database with SAPDBA. Using this procedure, you can find information on the cost-based optimizer (CBO) and control how SAPDBA updates statistics.

For more information on update statistics with SAPDBA, see Update Statistics for the Cost-Based Optimizer with SAPDBA.

Recommendation

We strongly recommend you to use the update statistics functionality in BRCONNECT instead of the SAPDBA functionality. The reason is that we will in future no longer develop the SAPDBA functions, whereas BRCONNECT functions will always be fully up-to-date.

Procedure

  1. To display existing statistics, choose Additional functions ® DB Optimizer control ® Show all statistics information in SAPDBA.
  2. This display tells you how many tables or indexes of the user SAPR3 have no statistics, and how many tables entered in the control table DBSTATC have obsolete statistics ( that is, TODO in DBSTATC is set).

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

  3. To check which tables need new statistics, choose Additional functions ® DB Optimizer control ® Check for new statistics in SAPDBA. Then choose the option you require:

Option

Description

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

With these options you can:

  1. To delete unnecessary statistics, choose Additional functions ® DB Optimizer control ® Delete statistics excluded for R/3.
  2. SAPDBA deletes tables not required for the R/3 System, such as pool and cluster tables or tables marked as not required in the DBSTATC control table ( Activ = N or R ).

  3. To create missing statistics for new tables or indexes, choose Additional functions ® DB Optimizer control ® 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.

Leaving content frame