文档 ID 457926.1

转到底部转到底部

In this Document

Goal
 Solution
 References

This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process and therefore has not been subject to an independent technical review.

APPLIES TO:

Oracle Database - Enterprise Edition - Version 10.2.0.1 to 11.2.0.3 [Release 10.2 to 11.2]
Oracle Database - Enterprise Edition - Version 12.1.0.1 to 12.1.0.1 [Release 12.1]
Information in this document applies to any platform.

GOAL

Outline how to Gather Optimizer Statistics For SYS and  'fixed' objects?

SOLUTION

Gather_schema_stats gathers statistics for objects owned by the SYS Schema. We recommend gathering statistics for the SYS schema, specifically if you are using Oracle APPS.

If your database encounters a lot of changes (DMLs) for SYS schema objects, then it is recommended to collect SYS schema statistics.  The collection of statistics on SYS Schema objects will optimize the performance of internal recursive queries and application queries on SYS schema objects.

To gather dictionary stats, execute one of the following:-

SQL> EXEC DBMS_STATS.GATHER_SCHEMA_STATS ('SYS');
SQL> exec DBMS_STATS.GATHER_DATABASE_STATS (gather_sys=>TRUE);
SQL> EXEC DBMS_STATS.GATHER_DICTIONARY_STATS;


Gather_fixed_objects_stats also gathers statistics for dynamic tables, e.g. the X$ tables which loaded in SGA during the startup. Gathering statistics for fixed objects would normally be recommended if poor performance is encountered while querying dynamic views ,e.g. V$ views. 
Since fixed objects record current database activity, statistics gathering should be done when database has a representative load so that the statistics reflect the normal database activity .

To gather the fixed objects stats, use the following:-

EXEC DBMS_STATS.GATHER_FIXED_OBJECTS_STATS;


Gather fixed objects stats if the load is heavy and if the system is busy.  For more details when to gather fixed object stats, read following note:


Document:798257.1GATHER_FIXED_OBJECTS_STATS Considerations

REFERENCES

NOTE:798257.1 - Fixed Objects Statistics(GATHER_FIXED_OBJECTS_STATS) Considerations
NOTE:392364.1 - DBMS_STATS.GATHER_FIXED_OBJECTS_STATS('ALL') Fails With ORA-20000 ORA-6512

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值