Does dbms_stats collects statistics for invisible indexes?
The answer is yes, Although the invisible indexes does not used by optimizer but they should be ready when it needed, hence the dbms_stats collects the statistics on the invisible indexes too.
Here is small test case.
SQL> select to_char(last_analyzed,'YYYY-MM-DD HH24:MI:SS'), VISIBILITY from dba_indexes where index_name='IDX_MTD';
TO_CHAR(LAST_ANALYZ VISIBILIT
------------------- ---------
2013-06-15 14:00:36 INVISIBLE
SQL>
SQL> execute dbms_stats.gather_table_stats(‘SCOTT’,,'IDX_MTD');PL/SQL procedure successfully completed.
SQL>
SQL> select to_char(last_analyzed,'YYYY-MM-DD HH24:MI:SS'), VISIBILITY from dba_indexes where index_name='IDX_MTD';TO_CHAR(LAST_ANALYZ VISIBILIT
------------------- ---------
2013-06-15 14:01:23 INVISIBLE
See the time stamp change , so it is.
-Thanks
Geek DBA
Follow Me!!!