Still don't know how to use dbms_stats [message #61056] |
Wed, 24 March 2004 05:02 |
Jadie
Messages: 64 Registered: January 2002
|
Member |
|
|
I read Oracle document about dbms_stats. I want to analyze some major schema in the production database. But I still don't know how to user dbms_stats.gather_schema_stats. There are so many parameters! I don't know what values I should use.
In order to improve the system's performance, except analyzing the schemas, what other statistics I should get? Appreciate your answer.
Jadie
|
|
|
Re: Still don't know how to use dbms_stats [message #61058 is a reply to message #61056] |
Wed, 24 March 2004 10:29 |
Thiru
Messages: 1089 Registered: May 2002
|
Senior Member |
|
|
Jadie,
Most of them have defaults,if you notice it carefully.
couple of examples:
SQL> execute dbms_stats.gather_schema_stats('THIRU');
PL/SQL procedure successfully completed.
the above 'computes' statistics on all (tables,partitions) owned by user 'THIRU' with the default(ie table default) degree of parallelism .
SQL> execute dbms_stats.gather_schema_stats(ownname=>'THIRU',cascade=>TRUE);
PL/SQL procedure successfully completed.
this one includes indexes.
and so on.
You could gather system statistics ,using DBMS_STATS.GATHER_SYSTEM_STATS in addition to object statistics to give CBO more information on the system.
-Thiru
|
|
|
|
|