Use
You can update statistics on the Oracle database using SAPDBA.
By running update statistics regularly, you make sure that the database statistics are up-to-date, so improving database performance. The Oracle cost-based optimizer (CBO) uses the statistics to optimize access paths when retrieving data for queries. If the statistics are out-of-date, the CBO might generate inappropriate access paths (such as using the wrong index), resulting in poor performance.
From Release 4.0, the CBO is a standard part of the SAP System. If statistics are available for a table, the database system uses the cost-based optimizer. Otherwise, it uses the rule-based optimizer.
We strongly recommend you to use the
Prerequisite
To use the CBO, make sure that the parameter
OPTIMIZER_MODE in the Oracle initialization profile init<SID>.ora is set to CHOOSE.Features
You can update statistics using one of the following methods:
For more information, see
We recommend you to use this approach instead of SAPDBA because you can schedule update statistics to run automatically at specified intervals (for example, weekly).
There are the following approaches to update statistics in SAPDBA:
This is the newer approach. It uses:
For more information, see
If you want to update statistics with SAPDBA, we recommend you to use the integrated approach instead of the two-phase approach.
This is the older approach. It uses separate phases to check and then if necessary update statistics. Although we recommend you not to use this approach, it is described here in case you are still using it. Be sure to run phases I and II regularly with this approach.
The following graphic shows the two-phase approach:
For more information on how SAPDBA decides whether a table needs update statistics, see