Search notes:

Oracle: Find table without or stale statistics

all_tab_statistics allows to find tables without or stale optimizer statistics:
select
   tst.owner,
   tst.table_name,
   tst.last_analyzed,
   tst.object_type
from
   all_tab_statistics  tst    join
   all_users           usr on tst.owner = usr.username
where
 ( stale_stats is null or stale_stats = 'YES' ) and
   usr.oracle_maintained <> 'Y'                 and
   table_name not like 'BIN$%'
order by
   owner,
   table_name;
Github repository oracle-patterns, path: /Installed/data-dictionary/tab/statistics/stale-or-no-statistics.sql

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1758199731, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/Oracle/installed/data-dictionary/tab/statistics/stale-or-no-statistics(50): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78