Quantcast
Channel: Doyensys Allappsdba Blog..
Viewing all articles
Browse latest Browse all 1640

Lock/unlock statistics of a table

$
0
0
There are cases where we do not need to update the statistics of the table so that oracle plan does not impact.
In those cases, we can lock the statistics of the table object using below procedure.


exec dbms_stats.lock_table_stats('AR','AR_IREC_USER_ACCT_SITES_ALL');


You can always unlock the statistics as below.

exec dbms_stats.unlock_table_stats('AR','AR_IREC_USER_ACCT_SITES_ALL');

To find the locked statistics table list, you will need to query dba_tab_statistics.

select table_name, stattype_locked
    from dba_tab_statistics
    where stattype_locked is not null;


Viewing all articles
Browse latest Browse all 1640

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>