Home » RDBMS Server » Server Administration » Method to execute schema stats (Oracle 11.2.0.1.0,Linux 2.6)
Method to execute schema stats [message #548438] Thu, 22 March 2012 04:53 Go to next message
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 #548442 is a reply to message #548438] Thu, 22 March 2012 05:00 Go to previous messageGo to next message
Michel Cadot
Messages: 68643
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
I want to buy a car, which one should I buy and why?

Regards
Michel
Re: Method to execute schema stats [message #548446 is a reply to message #548442] Thu, 22 March 2012 05:16 Go to previous messageGo to next message
Jack14
Messages: 497
Registered: December 2011
Location: INDIA
Senior Member
By looking at your answer, i would say we can use either of the methods to gather schema stats.

Please correct if i am wrong.

Regards,
Jack

Re: Method to execute schema stats [message #548458 is a reply to message #548446] Thu, 22 March 2012 06:25 Go to previous message
Michel Cadot
Messages: 68643
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
Previous Topic: Disk response time in tablespace
Next Topic: Create table
Goto Forum:
  


Current Time: Tue Apr 23 05:58:20 CDT 2024