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

Home -> Community -> Usenet -> c.d.o.server -> Re: Hints in Practice

Re: Hints in Practice

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Tue, 22 Aug 2006 23:09:41 +0100
Message-ID: <CrSdnZPEZso5HXbZnZ2dnUVZ8s6dnZ2d@bt.com>

Fairly close - especially on OLTP systems where the queries tend to be relatively simple and fairly precisely targeted - and most especially when you have a good schema design, use proper data types and include all the constraints.

On datawarehouse/batch/dss you may need to fall back to hints rather more often because large queries with many joins and predicates can run into problems with difficult cardinality estimates, and do silly things.

But if you need to use hints in a (complex) query, you need to be very thorough and ensure that you use plenty of hints if you want to guarantee a specific execution path.

-- 
Regards

Jonathan Lewis
http://www.oracle.com/technology/community/oracle_ace/ace1.html#lewis

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

Cost Based Oracle: Fundamentals
http://www.jlcomp.demon.co.uk/cbo_book/ind_book.html


"Robert Klemme" <shortcutter_at_googlemail.com> wrote in message 
news:4l0scsFe4upiU1_at_individual.net...

>
> All,
>
> from what I read and from my limited personal experience, hints are
> superfluous most of the time. The general recommendation seems to be
> "make sure your schema is properly done, create appropriate indexes, make
> sure statistics are up to date and let the CBO do its work". Hints seem
> to be useful only in very rare cases (bugs?) where the CBO doesn't come up
> with an appropriate plan. Is this a correct summary of the situation or
> did I miss something?
>
> Thanks
>
> robert
Received on Tue Aug 22 2006 - 17:09:41 CDT

Original text of this message

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