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: Statistics and optimizer

Re: Statistics and optimizer

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Wed, 9 May 2001 07:41:25 +0100
Message-ID: <989390551.9914.0.nnrp-10.9e984b29@news.demon.co.uk>

And it is worth remembering that certain physical features will automatically make Oracle run cost-based - e.g. queries using:

    partitioned segments
    parallel-defined segments
    IOTs
will automatically invoke CBO, and use the best guess statistics (i.e. little more than how many used blocks in the segment).

--
Jonathan Lewis
Yet another Oracle-related web site:  http://www.jlcomp.demon.co.uk

Practical Oracle 8i:  Building Efficient Databases
Publishers:  Addison-Wesley

Reviews at: http://www.jlcomp.demon.co.uk/book_rev.html



Ricky Sanchez wrote in message <3AF88BAA.12992A86_at_more.net>...

>That is correct. If you have any hint other than "rule", the entire
>query gets planned by CBO. Any hint, including weird things like
>push_subq or whatever.
>
>So, if you want to use rule, don't use hints, other than "rule".
>
>But, why are you hung up on RBO anyway? Why not just use CBO and drive
>the CBO quirks with appropriate hints. Or, tune the thing and then use
>the plan stability feature to enforce the tuned queries plan? If you are
>in a large scale environment, I suspect you are better off with CBO
>anyway. I mean, RBO is rather harsh. It will use an index if it can,
>even if it costs you performance. And, you cannot use many of the newer
>features with it, such as bitmap indexes, hash anti-joins, etc.
>
>- ricky
>
>
>
>Ann Myhre wrote:
>>
>> "Ricky Sanchez" <rsanchez_at_more.net> wrote in message
>> news:3AF74243.B4ECA8AA_at_more.net...
>> > Actually, a simple way of looking at it is that if *any* hint is used,
>> > other than "rule", then CBO will be used. If CBO is used for any part
of
>> > the query, ie subqueries, then the entire statement will use CBO.
>> >
>> > - ricky
>>
>> That really confuse me. What you say is that, if I use any hints exept
RULE,
>> and even though I haven't collected ANY statistics (there is absolutely
NO
>> statistics genererated an any object whatsoever), Oracle (optimizer) will
>> choose CBO?
>> My problem is that I want of course in most cases optimizer to choose
CBO,
>> but from the information I have got it seems that it will choose RBO if I
>> haven't rembered to use ANALYZE first. I have tried different approches
and
>> from the EXPLAIN PLAN it also seems to choose CBO even though I have not
>> used ANALYZE. But maybe I read something wrong?
>>
>> Ann
Received on Wed May 09 2001 - 01:41:25 CDT

Original text of this message

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