Updating the Statistics Information 
Use
Various statistics are compiled for each
database instance, such as the number of table entries, the size of the tables and indexes, and the value distribution (various values) of indexes and columns. This information is required by the
SAP DB Optimizer to define the best strategy for executing complex SQL statements.
database 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 base tables.
Prerequisites
The database instance is in the
ONLINE
operational state.
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.
The significance of the random sample depends on the size of the tables and the physical position of the data. Measurements have shown that for large tables, random samples 1000 and 5000 rows 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 ® Search. 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.Choose OptimizerStatistics ® Execute to update the statistics for the selected tables.