Analyze tables using OEM [message #206723] |
Fri, 01 December 2006 04:34 |
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 |
|
Mahesh Rajendran
Messages: 10708 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.
[Updated on: Fri, 01 December 2006 05:16] Report message to a moderator
|
|
|
|