Method to execute schema stats [message #548438] |
Thu, 22 March 2012 04:53 |
|
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 |
|
Michel Cadot
Messages: 68729 Registered: March 2007 Location: Saint-Maur, France, https...
|
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
|
|
|