16 March 2012

Gather Stats in Oracle 10g/11g

STATISTICS GATHERING ON DATABASE(ORACLE)

---------------------------------------

Gather statistics on table:
---------------------------

exec fnd_stats.gather_table_stats('SCHEMA',’TABLE’,estimate_percent => 15);


Gather Statistics on the Schema:
-------------------------------
EXEC DBMS_STATS.gather_schema_stats('SCHEMA', estimate_percent => 15);


Gather Statistics on the Index:
-------------------------------
EXEC DBMS_STATS.gather_index_stats('SCOTT', 'EMPLOYEES_PK', estimate_percent => 15);


Gather Statistics on Dictionary:
--------------------------------
EXEC DBMS_STATS.gather_dictionary_stats;


GATHER STATS FOR E-BUSINESS SUITE:
----------------------------------
exec fnd_stats.gather_schema_statistics('SCHEMA') --- For a specific schema

exec fnd_stats.gather_schema_statistics('ALL') --- For all schemas



Verify Stats:
-------------
exec fnd_stats.verify_stats('SCHEMA', 'OBJECT');

No comments:

Post a Comment