-- name : last_analyzed.sql -- date : 14-Nov-2001 -- Author : Pentest Limited -- Description: This script shows the statistics information for tables -- in the database. -- limitation : needs access to dba_tab_columns -- -- useage : SQL> @last_analyzed set pages 50 set feed off set verify off set linesize 200 spool sysstat.lis col table_name head "Table Name" for a30 col column_name head "Column Name" for a30 col newest head "Newest" for date col oldest head "Oldest" for date select table_name, column_name, to_char(max(last_analyzed), 'DD-MON-YYYY HH24:MI') newest, to_char(min(last_analyzed), 'DD-MON-YYYY HH24:MI') oldest from sys.dba_tab_columns where last_analyzed is not null and owner != 'SYS' group by table_name, column_name; spool off set pages 24 set feed on set verify on set lines 80