Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

difference between ANALYZE INDEX and ANALYZE TABLE

Jana KralovaOct 28 2010 — edited Oct 28 2010
I' m a bit confused when it comes to difference of the two.

Let's say I have a table into which I inserted a lot of rows and now I want to analyze it to make cost based optimizers guess more accurate.

The table has some indexes.

I can analyze the table using analyze statement or use DBMS_STATS package.
According to Oracle documentation -

" When you collect statistics for a table, Oracle Database also automatically collects the statistics for each conventional
and domain index of the table".

Doesn't just analyzing the table do the job. I mean, analyze the indexes as well.
Or is there any difference, so I should analyze indexes as well as the table.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 25 2010
Added on Oct 28 2010
1 comment
284 views