Stale Stats question on 11g
Hello,
I have a script which is running the following line and the table in question is not being returned as 'stale':
dbms_stats.gather_database_stats(OPTIONS=>'LIST STALE',GRANULARITY=>'ALL',CASCADE=> TRUE,objlist=> mylist);
When I run the following command for the table in question, it shows approx 16%
select b.mods,a.num_rows,b.mods/a.num_rows*100 percentage
from
(select num_rows from dba_tables
where owner='BEN' and table_name='BEN_EXT_RSLT_DTL') a,
(select sum(INSERTS+UPDATES+DELETES) mods
from dba_tab_modifications
where table_owner='BEN'
and table_name='BEN_EXT_RSLT_DTL'
I have a script which is running the following line and the table in question is not being returned as 'stale':
dbms_stats.gather_database_stats(OPTIONS=>'LIST STALE',GRANULARITY=>'ALL',CASCADE=> TRUE,objlist=> mylist);
When I run the following command for the table in question, it shows approx 16%
select b.mods,a.num_rows,b.mods/a.num_rows*100 percentage
from
(select num_rows from dba_tables
where owner='BEN' and table_name='BEN_EXT_RSLT_DTL') a,
(select sum(INSERTS+UPDATES+DELETES) mods
from dba_tab_modifications
where table_owner='BEN'
and table_name='BEN_EXT_RSLT_DTL'
0