[ACCEPTED]-How can I check the last time stats was run on Oracle without using OEM-statistics

Accepted answer
Score: 30

All of the following data dictionary tables 8 have a LAST_ANALYZED column (replace * with 7 USER/ALL/DBA as appropriate:

*_TABLES
*_TAB_PARTITIONS
*_TAB_SUBPARTITIONS
*_INDEXES
*_IND_PARTITIONS
*_IND_SUBPARTITIONS

(There's lots 6 more in the histograms fields, but I'm not 5 going that deep.)

Conversely, ALL_TAB_MODIFICATIONS shows rows 4 inserted/updated/deleted (or the timestamp 3 on which a table/partition/subpartition 2 was truncated) since it had optimizer statistics 1 gathered.

Score: 2
SELECT LAST_START_DATE 
 FROM DBA_SCHEDULER_JOBS 
WHERE job_name='GATHER_STATS_JOB';

You may have to tweak the date format depending 1 on your SQLPLUS/NLS Settings.

More Related questions