last_analyzed Oracle tables

select table_name, last_analyzed, num_rows
from user_tables
where last_analyzed < sysdate - 1
order by 3;

select trunc(last_analyzed) "LAST_ANALYZED",
count(*), decode(db_unique_name,null,name,db_unique_name) DBNAME, to_char(sysdate,'DD-MON-YYYY HH24:MI:SS') "RUNTIME"
from dba_tables, v$database
where owner='<username>' and last_analyzed >= sysdate-20
group by trunc(last_analyzed), decode(db_unique_name,null,name,db_unique_name)
order by trunc(last_analyzed);


Popular posts from this blog

finding fragmentation at table level and tablespace level in Oracle and steps to remove them

ORA-01153: an incompatible media recovery is active standby database oracle

ORA-16191: Primary log shipping client not logged on standby