Is there a way to update all statistics for all tables regardless of the owner?
I found this sniplet, but I'm not sure if this will grab all tables....
BEGIN FOR A IN ( SELECT owner FROM SYS.all_tables ) LOOP execute immediate EXEC dbms_stats.gather_schema_stats( 'A.owner', cascade='TRUE'); END LOOP; END;
Use DBMS_STATS.GATHER_DATABASE_STATS:
begin dbms_stats.gather_database_stats; end; /
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With