Entering content frameProcedure documentation Updating the Statistics Information Locate the document in its SAP Library structure

Use

Various statistics are compiled for each Structure linkdatabase instance, such as the number of table entries, the size of the tables and indices, and the value distribution (various values) of indices and columns. This information is required by the Structure linkSAP DB Optimizer to define the best strategy for executing complex SQL statements.
The statistics information is stored in the
Structure linkdatabase catalog.

If the database size or the values it contains have changed considerably, you will have to update the statistics. This should be carried out roughly once a week.

The statistics values can be updated for certain tables, columns, or for all basic tables.

Prerequisites

The database instance is in ONLINE mode.

Procedure

Choose Instance ® Tuning ® Optimizer Statistics.

Updating statistics entries for all tables

If you then choose OptimizerStatistics ® Execute, all of the statistics entries for all of the tables are updated.

Updating statistics entries for selected tables or columns

You can also choose to update selected statistics only:

To do so, enter appropriate search arguments under Owner, Table Name and Column Name.
You can specify the size of sample by entering appropriate values in the
Estimate Rows and Estimate Percent fields. The update is then only carried out across the number of rows or the specified percentage, based on the total number of database tables. This option, therefore, is faster.

Note

The reliability of the random sample depends on the size of the table and the physical position of the data. Measurements have shown that random samples of between 1000 and 5000 rows in large tables have short response times and produce high-quality results.

Owner

Owner

Table Name

Table name

Column Name

Column name

Estimate Rows

Number of rows checked

Estimate Percent

Percentage of rows checked

Then choose OptimizerStatistics ® Select. A list of the tables that match your criteria is then displayed. From the Update Statistics Date and Update Statistics Time, you can tell when the statistics for this table were last updated.
If you want to update the statistics for one of the tables in the list, simply select the relevant entry. If you want to update the statistics for all of the tables, choose OptimizerStatistics ® Mark All.

Choose OptimizerStatistics ® Execute to update the statistics for the selected tables.

 

 

Leaving content frame