Use of Histogram and Statistics for All Index columns or All columns? [message #167202] |
Tue, 11 April 2006 18:02 |
SMISHRA
Messages: 5 Registered: April 2006 Location: Canada
|
Junior Member |
|
|
Hi All,
I am new doing this App Tuning task and, we are in preliminary stag at this time.
We are currently running the Oracle 10g Release1 in CBO (Cost Base Optimizer) Mode, and DBA have gathered the statistics for tables, columns and indexes.
We have generated the statistics for all columns using 'FOR ALL COLUMNS SIZE AUTO'.
I have noticed we have issues with query involving the order by Clause i.e. ORDER BY LAST_NAME,FIRST_NAME,LOCATION.
I was wondering what If I gathered the statistics on 'All Index Columns' only as oppose to having 'FOR ALL COLUMNS SIZE AUTO'.
Please help me understand, which option is better as far as stat generation is concerned as well as use/benefit/disadvantage of histogram.
Please provide me any doc around the HISTOGRAM and best practise of gathering Statistics.
Thanks in Advance. This is my first posting on this site and I hope to get some good information.
|
|
|
|
Re: Use of Histogram and Statistics for All Index columns or All columns? [message #167410 is a reply to message #167203] |
Wed, 12 April 2006 20:03 |
SMISHRA
Messages: 5 Registered: April 2006 Location: Canada
|
Junior Member |
|
|
Hi Mahesh,
Thanks for your reply. I'll go thru some documentation around the histogram. I think is good starting point.
I am not sure about the approach toward tuning yet but will I would like to start on the right foot.
FYI, we have gathered the stat on schema level for all index columns not on the table level. Previously, It was 'all columns size auto' What I noticed today is that some of my query run faster from SQL*PLUS but the same from UI (User Interface (Siebel) firing the same query is slower...).
I am still trying to understand the difference between the various method of stat gathering and their benefits.
Once again Thanks for your reply.
- SM
|
|
|
|
Re: Use of Histogram and Statistics for All Index columns or All columns? [message #167548 is a reply to message #167531] |
Thu, 13 April 2006 15:39 |
SMISHRA
Messages: 5 Registered: April 2006 Location: Canada
|
Junior Member |
|
|
Hi Mahesh,
One more thing, I like to ask. We have gathered the stats using the below procedure.
begin
dbms_stats.gather_schema_stats(
ownname => 'CONV',
method_opt => 'FOR ALL INDEXED COLUMNS',
granularity => 'ALL',
cascade => TRUE,
degree => DBMS_STATS.DEFAULT_DEGREE);
end;
/
Please let me if you see any issue in gathered stats.
Thanks for your time.
|
|
|
|