![]() SQL> exec dbms_stats.unlock_table_stats('scott', 'test') Įnter your email address to follow this blog and receive notifications of new posts by email. SQL> analyze index ajaffer.test_idx compute statistics Īnalyze index ajaffer.test_idx compute statistics try to gather statistics on the index using analyze ORA-20005: object statistics are locked (stattype = ALL) SQL> exec dbms_stats.gather_index_stats('scott', 'test_idx') īEGIN dbms_stats.gather_index_stats('scott', 'test_idx') END try to gather statistics on locked table shows when stats is locked the value of stattype_locked is ALL SQL> exec dbms_stats.lock_table_stats('scott', 'test') ![]() SQL> SELECT stattype_locked FROM dba_tab_statistics WHERE table_name = 'TEST' and owner = 'SCOTT' shows when stats is not locked the value of stattype_locked is NULL The following example shows how to lock table statistics and what happens when one tries to gather statistics on table that has statistics locked. In certain cases you may want to lock statistics in a table in certain cases, for example if you want a table not be analyzed by automatic statistics job but analyze it later or in cases where you want prevent from analyzing statistics in cases where data in the table doesn’t change.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |