Advice on Gather_stats [message #522071] |
Tue, 06 September 2011 06:12 |
sathik
Messages: 196 Registered: August 2009 Location: INDIA
|
Senior Member |
|
|
Hi,
I am in the situation of analyzing all the objects resides in some schemas for 63 databases. Since the objects(>80%) were not getting analyzed for more than 2 years.
Which is the best method to analyze the particular schema objects? Since some of my colleagues are suggested, not to go with schema analyze. Since it will make some problem in the performance side.And they said, it always best to go with individual table analyze.
Can anybody help me to decide which is the best approach for analyzing the schema objetcs by without affecting the query performace negatively?
|
|
|
Re: Advice on Gather_stats [message #522098 is a reply to message #522071] |
Tue, 06 September 2011 08:06 |
cookiemonster
Messages: 13958 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Well 10g has a job to automatically gather stats for you. As for the other versions, what makes your colleages believe this:
sathik wrote on Tue, 06 September 2011 12:12Hi,
Since some of my colleagues are suggested, not to go with schema analyze. Since it will make some problem in the performance side.And they said, it always best to go with individual table analyze.
|
|
|
|
Re: Advice on Gather_stats [message #522382 is a reply to message #522103] |
Fri, 09 September 2011 02:54 |
|
msol25
Messages: 396 Registered: June 2011
|
Senior Member |
|
|
hi Sathik,
When you analyze complete schema then you are updating statistics into dynamic performance views.If you are going
to analyze schema then your rollback segment usage will increase.
But its always better to analyze specific tables according to your need.
If you are trying to tune your database then you should analyze complete schema before running statspack report.
Actually it depends on situation what you need.If you are working in normal scenario then only analyze to specific
tables according to your requirement.
just use this command:
Analyze table IN Oracle 8i,9i,10g:
begin
dbms_stats.gather_table_stats(
ownname => 'NCL_PIMS',
tabname => 'PHYSICAL_RESOURCE_SPEC',
estimate_percent => dbms_stats.auto_sample_size,
method_opt => 'for all columns size skewonly',
cascade => true,
degree => 7
);
end;
Analyze schema in Oracle8i,9i,10g:
begin
DBMS_STATS.GATHER_SCHEMA_STATS( 'PIRM_OWNER');
end;
DBMS_STATS package available for Oracle8i and above.
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Advice on Gather_stats [message #522493 is a reply to message #522420] |
Sun, 11 September 2011 00:18 |
sathik
Messages: 196 Registered: August 2009 Location: INDIA
|
Senior Member |
|
|
hi msol25,
I am not clear in your answer. Before clearing that, i like to post my question once again for all our better understanding. for ex, I have 100 tables in a schema. Those objects are not analyzed since last 2 years. I like to analyze all the objects in that schema to improve the query performance. In this case,can u pls tell me which is the best approach interms of performance either by analyzing the schema using gather_schema_stats or analyzing 100 tables individualy using gather_table_stats?
|
|
|
|
|
|
|
Re: Advice on Gather_stats [message #522509 is a reply to message #522497] |
Sun, 11 September 2011 01:25 |
sathik
Messages: 196 Registered: August 2009 Location: INDIA
|
Senior Member |
|
|
I asked the same question whatevr u asked to the application team, they said the same answer whatever I said. So I can't able to provide the proof for the data difference.
|
|
|
|
|
|
Re: Advice on Gather_stats [message #522515 is a reply to message #522513] |
Sun, 11 September 2011 03:38 |
|
Michel Cadot
Messages: 68716 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
Quote:Then check your hit ratios.
Which hit ratios?
It seems you've been out of Oracle world since the previous century.
I think you shuld reactualize your knowledge reading documentation and articles from versions that are from this century.
Regards
Michel
|
|
|