Name

ANALYZE CLUSTER

Synopsis

ANALYZE CLUSTER
[schema.]cluster_name
   {
   COMPUTE STATISTICS |
ESTIMATE STATISTICS [SAMPLE integer ROWS |
PERCENT] |
   DELETE STATISTICS |
   VALIDATE STRUCTURE [CASCADE] |
LIST CHAINED ROWS [INTO
[schema.]table_name]
   }

Collects or deletes statistics about a cluster (cluster_name), validates the structure of the cluster, or identifies migrated and chained rows in the cluster.

Keywords

COMPUTE STATISTICS

Computes the exact statistics for the entire named object and stores them in the data dictionary.

ESTIMATE STATISTICS

Estimates statistics for the object named and stores them in the data dictionary. A SAMPLE may be specified: ROWS causes integer rows of a table or cluster, or integer entries from an index, to be sampled. PERCENT causes integer percent of the rows of a table or cluster or integer percent of the entries of an index to be sampled. The valid range for PERCENT is 1- 99.

DELETE STATISTICS

Causes all statistics stored in the data dictionary for the named object to be deleted.

VALIDATE STRUCTURE

Causes the structure of the named object to be validated. The CASCADE keyword causes any tables or indexes associated with the named object to also be validated.

LIST CHAINED ROWS

Generates a list of chained and migrated rows for the named table or cluster (this operation is not permitted on an index). Entries are made in a table called CHAINED_ROWS, which is assumed to exist in the user’s schema, unless the INTO clause specifies a different table_name.

Notes

You must own the object to be analyzed or have the ANALYZE ANY privilege to issue this command. If you want to use the LIST CHAINED ROWS operation to list into a table, that table must be in your schema or you must have the INSERT privilege on it. COMPUTE STATISTICS will result in more accurate statistics, but is likely to take longer. ESTIMATE STATISTICS will normally be much faster and almost as accurate. Statistics are stored in the DBA_CLUSTERS, DBA_TABLES, and DBA_INDEXES data dictionary views.

Example

The following example analyzes scott’s empclus cluster using a 50% sample:

ANALYZE CLUSTER scott.empclus ESTIMATE STATISTICS SAMPLE 50 PERCENT
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset