-checkopt 

Phase I determines whether new statistics are needed and enters this as a TODO flag in the control table DBSTATC . Using SAPDBA internal rules, methods are entered in DBSTATC for creating or updating obsolete or non-existent statistics.

Standard call

sapdba -checkopt PSAP% -method E

The sapdba -checkopt PSAP% call uses the primary index to determine the size of all tables. checkopt only enters tables into DBSTATC that already have statistics.

Syntax

sapdba

-u system/<password>

-checkopt <tablespace | tablespace list | table | <keyword>>

-method E | C

-option R<n (*1000)> | P<n>

-time <d>

-T -<h>

-force

SAPDBA Command Options

-u

Database user / password

-checkopt

Database objects and key words for the operation

-method

Analysis method

-option

Option for the analysis method (only for the method E )

-time <d>

Updates all statistics older than <d> days

-T <h>

Restricts the operation to <h> hours

-force

Resets the TODO flags in the control table DBSTATC regardless of the current situation

Key Words

DBSTATC_TAB

All tables entered in the control table DBSTATC

SAPDBA chooses the correct analysis method and option and enters them into the control table DBSTATC if the customer flag is not set. If the table is small the optimizer starts with the method C ; if the table grows it switches to the method E .

The checkopt logs are in the directory sapcheck/<timestamp>.opt .

For more information, see: