All_tab_statistics showing recycle bin information
I'm writing a procedure to ascertain stale and locked statistics, I'm using all_tab_statistics to get this information. However it also shows any objects which maybe in the recyclebin, other than putting in another condition in the SQL to filter out 'BIN$%' objects is there a better way ?
Please see below as an example.
Regards
Satbinder
SQL> select * from all_tab_statistics
2 where owner NOT IN ('SYS','SYSTEM','DBSNMP','PATROL','WMSYS','OUTLN','SYSMAN','EXFSYS','CTXSYS','MDSYS','OLAPSYS')
3 and stale_stats IS NULL
4 /
OWNER TABLE_NAME
------------------------------ ------------------------------
PARTITION_NAME PARTITION_POSITION SUBPARTITION_NAME
------------------------------ ------------------ ------------------------------
SUBPARTITION_POSITION OBJECT_TYPE NUM_ROWS BLOCKS EMPTY_BLOCKS AVG_SPACE