Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Is Richard Niemiec Right
"Jonathan Lewis" <jonathan_at_jlcomp.demon.co.uk> wrote in message news:bkk8m3$rul$1$8302bc10_at_news.demon.co.uk...
>
> It is quite easy with a single table query to switch between
> the correct answer and a query failure (i.e. Oracle error) by
> switching the order of predicates - both in RBO and CBO.
> But it does require bad design in the first place, followed
> by queries that then have to use type-coercion inappropriately
This is interesting. Is that to do with implicit type conversion or PK of one type and FK of another? Can you point me to an example to make it clear? You're not talking about switching left and right sides of a logical comparison, are you?
> > Now, IF you want to write your statements in a defensive fashion so
> > that they will work well with ot without the CBO (in case the user
> has
> > CBO on but no stats), there MAY be a case for writing them using the
> old
> > RBO rules.
> >
>
> Not really - RBO works from bottom to top, CBO works from
> top to bottom as far as 'tie-breaks' on join orders go.
Whoa! That's interesting. Nasty...
Haven't had it happen to me yet, but I usually avoid
"tie break" joins like the plague! ;)
-- Cheers Nuno Souto wizofoz2k_at_yahoo.com.au.nospamReceived on Sun Sep 21 2003 - 08:46:38 CDT