Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: analyze problems

RE: analyze problems

From: Jeroen van Sluisdam <jeroen.van.sluisdam_at_vrijuit.nl>
Date: Thu, 11 Dec 2003 02:44:26 -0800
Message-ID: <F001.005D98B5.20031211024426@fatcity.com>


Hi Jonathan,

Can you please elaborate on this 75 buckets issue. I had an advice from an oracle consultant to implement analyzing Like this. BTW column statistics are there but it makes no difference In plans. I also added optimizer_index_caching=90 and Optimizer_index_cost_adj=40 both also without effect on my testcase

Thnx,

Jeroen

-----Oorspronkelijk bericht-----
Van: Jonathan Lewis [mailto:jonathan_at_jlcomp.demon.co.uk] Verzonden: Thursday, December 11, 2003 10:49 Aan: Multiple recipients of list ORACLE-L Onderwerp: Re: analyze problems

Take a look at user_tab_columns -
your choice of:

    method_opt => 'for columns'

On a quick test on 9.2.0.3 this seems to leave the columns with null statistics.

(check

    select column_name, num_distinct
    from user_tab_columns
)

In passing, computing histograms with 75 buckets for all indexed columns is a strategy that probably needs refining.

Regards

Jonathan Lewis
http://www.jlcomp.demon.co.uk

  The educated person is not the person
  who can answer the questions, but the
  person who can question the answers -- T. Schick Jr

One-day tutorials:
http://www.jlcomp.demon.co.uk/tutorial.html

Three-day seminar:
see http://www.jlcomp.demon.co.uk/seminar.html ____UK___November

The Co-operative Oracle Users' FAQ
http://www.jlcomp.demon.co.uk/faq/ind_faq.html

> Hi,
>
> I'm in the middle of migrating oracle 7.3.4 to oracle 9.2.0.4
> In process of testing we encounter a big query that is now taking full
table
> scans
> Where it used to take indexes. When we compare plans this is evidently so,
> Optimizer_mode is on both choose, tables and indexes are analyzed
> When I add a rule hint on 9.2.0.4 plan it takes the indexes
> On 7.3.4 we use for analyzing : analyze table, now I tried using
> exec DBMS_STATS.GATHER_SCHEMA_STATS(OWNNAME => 'VRIJ_UIT',CASCADE => TRUE,
> METHOD_OPT => 'FOR COLUMNS');
> exec DBMS_STATS.GATHER_SCHEMA_STATS(OWNNAME => 'CONTRACTEN',CASCADE =>
TRUE,
> METHOD_OPT => 'FOR COLUMNS'
> );
> exec DBMS_STATS.GATHER_SCHEMA_STATS(OWNNAME => 'FIN',CASCADE => TRUE,
> METHOD_OPT => 'FOR COLUMNS');
>
> rem for all indexes columns size 75
>
> exec DBMS_STATS.GATHER_SCHEMA_STATS(OWNNAME => 'VRIJ_UIT', CASCADE =>
> FALSE, METHOD_OPT => 'FOR ALL IND
> EXED COLUMNS size 75');
> Etc...
>
> Are there any known do and don'ts concerning dbms_stats which might
explain
> this?
> Is it better to stay on analyze table ?
> Can I expect lot's of problems in execute plans when migrating?
>
> Any answers, tips and trics are appreciated.
> Details: HP-UX11.11, Oracle 9.2.0.4
>
> Regards,
>
> Jeroen
>

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Jonathan Lewis
  INET: jonathan_at_jlcomp.demon.co.uk

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Jeroen van Sluisdam
  INET: jeroen.van.sluisdam_at_vrijuit.nl

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Thu Dec 11 2003 - 04:44:26 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US