ANALYZE_SCHEMA procedure - Gather statistics on schema tables, clusters, and indexes
The ANALYZE_SCHEMA procedure provides the capability to gather statistics on tables, clusters, and indexes in the specified schema.
Syntax
Parameters
- schema
- An input argument of type VARCHAR(128) that specifies the schema name of the schema whose objects are to be analyzed.
- method
- An input argument of type VARCHAR(128) that specifies the type
of analyze functionality to perform. Valid values are:
- ESTIMATE - gather estimated statistics based upon on either a specified number of rows in estimate_rows or a percentage of rows in estimate_percent;
- COMPUTE - compute exact statistics; or
- DELETE - delete statistics from the data dictionary.
- estimate_rows
- An optional input argument of type INTEGER that specifies the number of rows on which to base estimated statistics. One of estimate_rows or estimate_percent must be specified if the method is ESTIMATE. The default value is NULL.
- estimate_percent
- An optional input argument of type INTEGER that specifies the percentage of rows upon which to base estimated statistics. One of estimate_rows or estimate_percent must be specified if the method is ESTIMATE. The default value is NULL.
- method_opt
- An optional input argument of type VARCHAR(1024) that specifies
the object types to be analyzed. Any combination of the following
keywords are valid:
- [FOR TABLE]
- [FOR ALL [ INDEXED ] COLUMNS ] [ SIZE n ]
- [FOR ALL INDEXES]
Authorization
EXECUTE privilege on the DBMS_UTILITY module.