Oracle9i Supplied PL/SQL Packages and Types Reference
Release 1 (9.0.1)

Part Number A89852-02
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

DBMS_DDL, 3 of 3


ANALYZE_OBJECT Procedure

This procedure provides statistics for the given table, index, or cluster. It is equivalent to the following SQL statement:

ANALYZE TABLE|CLUSTER|INDEX [<schema>.]<name> [<method>] STATISTICS [SAMPLE <n> 
[ROWS|PERCENT]]

Syntax

DBMS_DDL.ANALYZE_OBJECT (
   type             VARCHAR2, 
   schema           VARCHAR2, 
   name             VARCHAR2, 
   method           VARCHAR2, 
   estimate_rows    NUMBER   DEFAULT NULL, 
   estimate_percent NUMBER   DEFAULT NULL,
   method_opt       VARCHAR2 DEFAULT NULL,
   partname         VARCHAR2 DEFAULT NULL);

Parameters

Table 8-4 ANALYZE_OBJECT Procedure Parameters
Parameter  Description 
type
 

One of TABLE, CLUSTER or INDEX. If none of these, an ORA-20001 error is raised. 

schema
 

Schema of object to analyze. NULL means current schema, case-sensitive. 

name
 

Name of object to analyze, case-sensitive. 

method
 

One of ESTIMATE, COMPUTE or DELETE.

If ESTIMATE, then either estimate_rows or estimate_percent must be non-zero. 

estimate_rows
 

Number of rows to estimate. 

estimate_percent
 

Percentage of rows to estimate.

If estimate_rows is specified, then ignore this parameter. 

method_opt
 

Method options of the following format.

[ FOR TABLE ]
[ FOR ALL [INDEXED] COLUMNS] [SIZE n]
[ FOR ALL INDEXES ]
 
partname
 

Specific partition to be analyzed. 

Exceptions

Table 8-5 ANALYZE_OBJECT Procedure Exceptions
Exception  Description 
ORA-20000:
 

Insufficient privileges or object does not exist. 

ORA-20001:
 

Bad value for object type.

Should be either TABLE, INDEX or CLUSTER

ORA-20002:
 

METHOD must be one of COMPUTE, ESTIMATE or DELETE


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback