difference between ANALYZE INDEX and ANALYZE TABLE
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.