Home » RDBMS Server » Performance Tuning » Analyze tables using OEM
Analyze tables using OEM [message #206723] Fri, 01 December 2006 04:34 Go to next message
seema.taunk
Messages: 96
Registered: October 2006
Member
Hi friends,

I have a doubt regarding analyze table using OEM
When we analyze table using OEM ( compute statistics) , it shows option: Using latest 8i analyze method ( dbms_stats package).
When we click on next , it shows
begin
dbms_stats.gather_table_stats(ownname=> 'User name', tabname=> 'table name', partname=> NULL);
end;

and similarly for index using OEM ( right click on index)
analyze-> next, it shows
begin
dbms_stats.gather_index_stats(ownname=> 'User name', indname=> 'index name', partname=> NULL);
end;


2nd method not using OEM:

dbms_stats.gather_table_stats(ownname=> 'username', tabname=> 'tablename', cascade=>true,method_opt=>'For all indexed columns size your_size);

Can u please tell me whether both methods are same?
Or Will results differ in both methods?


Please advice.



Re: Analyze tables using OEM [message #206733 is a reply to message #206723] Fri, 01 December 2006 05:12 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
>> dbms_stats.gather_table_stats(ownname=> 'username', tabname=> 'tablename', cascade=>true,method_opt=>'For all indexed columns size your_size);
YOu are gathering stats for both index and table and in table only for those columns that are indexed.
>> dbms_stats.gather_table_stats(ownname=> 'User name', tabname=> 'table name', partname=> NULL);
You are gathering stats for table.
>>dbms_stats.gather_index_stats(ownname=> 'User name', indname=> 'index name', partname=> NULL);
for index.

>>Can u please tell me whether both methods are same?
Yes. But by using this
>> dbms_stats.gather_table_stats(ownname=> 'User name', tabname=> 'table name', partname=> NULL);
You are collecting stats on all columns.Whether indexed or not.

Edit:

Obiously, my eyes deceived and i failed to see you are already using cascade=>true.
Smile

[Updated on: Fri, 01 December 2006 05:16]

Report message to a moderator

Re: Analyze tables using OEM [message #207020 is a reply to message #206733] Sun, 03 December 2006 22:53 Go to previous message
seema.taunk
Messages: 96
Registered: October 2006
Member
Thanx mahesh.........
Razz
Previous Topic: Performance of Lower() function in query
Next Topic: Stored Procedure Performance Slows
Goto Forum:
  


Current Time: Thu May 02 06:18:53 CDT 2024