Oracle DB: Gather statistics – Show statistics

Gather schema statsistics:

exec dbms_stats.gather_schema_stats( -
     ownname          => 'SCOTT', -
     options          => 'GATHER AUTO'
   );

Show schema stats:

select * from DBA_IND_STATISTICS WHERE OWNER='SCOTT'

select * from DBA_TAB_STATISTICS WHERE OWNER='SCOTT'

select * from DBA_TAB_COL_STATISTICS WHERE OWNER='SCOTT'

Summarized statistics can be taken also by:

select * from DBA_TABLES WHERE OWNER='SCOTT'

Leave a Reply