select table_name,
count(*) "daysHistoryAvl"
from dba_tab_stats_history
where lower(table_name) =lower('&&TABLE_NAME') and owner ='&&OWNER_NAME' group by table_name
select owner, table_name, to_char(stats_update_time,'YYYY-MM-DD') Stats_update_time
, count(*)
from dba_tab_stats_history
where owner ='&&OWNER_NAME' and table_name
='&&TABLE_NAME' and stats_update_time
> sysdate - 5 group by owner,
table_name, to_char(stats_update_time,'YYYY-MM-DD') order by 3
No comments:
Post a Comment