查看统计信息是否过期

查看统计信息是否过期:
DML 超过了 10% 都会过期
 
exec dbms_stats.flush_database_monitoring_info;
 
select owner, table_name name, object_type, stale_stats, last_analyzed
  from dba_tab_statistics
 where owner = 'SCOTT' 
   and table_name in ('TEST')
   and (stale_stats = 'YES' or last_analyzed is null);
   
   
原文地址:https://www.cnblogs.com/liang545621/p/12611899.html