Use
You can use this SAPDBA command to check and update statistics for the Oracle database in a single integrated phase.
We strongly recommend you to use the
This command is equivalent to the older two-phase approach using
sapdba –checkopt and sapdba –analyze. We recommend you to use the new approach.For a comparison of the old and new approaches, see
Update Statistics for the Cost-Based Optimizer with SAPDBA.For more information on the new approach, see
Updating Statistics using Integrated Approach with SAPDBA. This also has more information on the commands listed below.Syntax
Here is the detailed command syntax:
sapdba
-statistics ALL | DBSTATCO | <tables>
[ -method E | C | EH | CH
-option Pn | Rn ]
The following examples illustrate the use of this command:
sapdba –statistics
You can put
–ALL at the end of this statement, but this does not change the command and is not necessary.sapdba -statistics DBSTATCO
sapdba -statistics psap*
sapdba -statistics ALL -method E -option P10