Method to execute schema stats [message #548438] |
Thu, 22 March 2012 04:53 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.gravatar.com/avatar/7587f1e1dc7836c6b81ad21d234a2aad?s=64&d=mm&r=g) |
Jack14
Messages: 497 Registered: December 2011 Location: INDIA
|
Senior Member |
|
|
Hi,
When we want to gather schema statistics which method we should follow and why ?
Please advice.
exec dbms_utility.compile_schema('SHIKHAR');
or
BEGIN
SYS.DBMS_STATS.GATHER_SCHEMA_STATS (
OwnName => 'JACK'
,Granularity => 'DEFAULT'
,Options => 'GATHER'
,Gather_Temp => FALSE
,Estimate_Percent => SYS.DBMS_STATS.AUTO_SAMPLE_SIZE
,Method_Opt => 'FOR ALL COLUMNS SIZE AUTO '
,Degree => 4
,Cascade => TRUE
,No_Invalidate => FALSE);
END;
/
Regards,
|
|
|
|
|
Re: Method to execute schema stats [message #548458 is a reply to message #548446] |
Thu, 22 March 2012 06:25 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](http://www.orafaq.com/forum/images/custom_avatars/102589.gif) |
Michel Cadot
Messages: 68675 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
My analogy was not correct.
compile_schema compile the objects
gather_statistics gathers statistics
They cannot be compared, they do completly different things. It is like comparing network and CPU.
Regards
Michel
|
|
|