Thursday, December 9, 2010

Stale Stat

Below query displays if stat is stale for a table

 select OWNER,TABLE_NAME,num_rows,STALE_STATS from dba_tab_statistics where table_name = 'TEST1';

dba_tab_modifications keeps track of number of inserts/updates/deletes for a table. Around 10% of changes, causes stat for a table to be stale.


exec dbms_stats.flush_database_monitoring_info; 

Above would flush stat related monitroing info in dictionary tables. e.g stale_stat flag.

No comments:

Post a Comment