Speed Up the gathering of stats. [message #510088] |
Thu, 02 June 2011 09:00  |
oraranjangmailcom
Messages: 67 Registered: April 2010
|
Member |
|
|
Hi
I am gathering stats by using below block i.e., for some 3 million records and there are 6 indexes on the table. What is the relevance of value 4 here (i.e., method_opt => 'FOR ALL INDEXED COLUMNS SIZE 4')?
If I increase 4 to 250 will there be any speed change in gathering stats. My intention is to speed up the gathering of stats.
begin
dbms_stats.gather_table_stats(
ownname => SYS_CONTEXT('USERENV', 'CURRENT_SCHEMA'),
tabname => 'LEGAL_VIEW_TARGET',
method_opt => 'FOR ALL INDEXED COLUMNS SIZE 4',
cascade => TRUE
);
END;
Thanks in Advance.
|
|
|
|
|
|
|
Re: Speed Up the gathering of stats. [message #510111 is a reply to message #510100] |
Thu, 02 June 2011 09:31   |
oraranjangmailcom
Messages: 67 Registered: April 2010
|
Member |
|
|
I have gone through the docs and understood different options available in method_opt but as I was unable to find answer to my above question, raised it here...
Actually, '4' was proposed by DBA. I am just trying to understand "If I increase 4 to 250 will there be any speed up in gathering histograms" or "other options in speedup of the below block"
dbms_stats.gather_table_stats(
ownname => SYS_CONTEXT('USERENV', 'CURRENT_SCHEMA'),
tabname => 'LEGAL_VIEW_TARGET',
method_opt => 'FOR ALL INDEXED COLUMNS SIZE 4',
cascade => TRUE
);
[Updated on: Thu, 02 June 2011 09:33] Report message to a moderator
|
|
|
|
|
Re: Speed Up the gathering of stats. [message #510120 is a reply to message #510114] |
Thu, 02 June 2011 09:52   |
cookiemonster
Messages: 13965 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
More buckets = more detailed histogram.
So increasing the number I would assume is more likely to decrease the speed of stats gathering.
However as Blackswan points out the only way to tell for sure is to test it.
|
|
|
|
|
|
|