Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Analyzing procedures difference?
HI,
Oleg Roshchin wrote:
> Hi, all!
>
> What is the difference between DBMS_Utility.Analyze_Schema
This procedure analyzes all the tables, clusters, and indexes in a schema. This can take a lot of time.
> and DBMS_Utility.Analyze_Part_Object?
This procedure is equivalent to SQL:
"ANALYZE TABLE|INDEX [<schema>.]<object_name> PARTITION <pname>
[<command_type>]
[<command_opt>] [<sample_clause>]
Here you can analyze each partition of an partioned table separat and/or for each partition of the object, run in parallel using job queues.
If you want to analyze non-partitioned table you can use
DBMS_DDL.ANALYZE_OBJECT.
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]]
> In the book "Oracle8 Server Tuning" it's written to use the second
> procedure and nothing about the first one.
> Is the first procedure enough for analyzing everything in the
> schema
Yes, the other procedures are more selective.
Hope it helps, Jan
--
![]() |
![]() |