Be cautious while running below steps.
Follow step wise. You need to have apps privilege to database.
- select distinct owner, table_name, stattype_locked from dba_tab_statistics where stattype_locked is not null; (Find all locks)
- exec dbms_stats.unlock_schema_stats('SYS') ;
- exec dbms_stats.unlock_table_stats('SYS','WRH$_SYSSTAT');
- exec dbms_stats.gather_table_stats(ownname => 'PO', tabname => 'PO_SESSION_GT', cascade=> true, degree=> 8); (Execute Gather schema stats on Table if needed or next step to execute on whole schema)
- exec dbms_stats.gather_schema_stats(ownname=>'PO', estimate_percent=>40)
No comments:
Post a Comment