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: Is Richard Niemiec Right

Re: Is Richard Niemiec Right

From: Buck Turgidson <jc_va_at_hotmail.com>
Date: Thu, 02 Oct 2003 13:49:44 GMT
Message-ID: <46208c1c1e79433cda7a5928b6b1b292@news.teranews.com>


From what I understand it is false, also, but is it worth noting that the absence or existence of histograms help the optimizer in choosing what table would be the best driver, given the where clause?

> > the most unqualified rows
>
> It looks as if you have missed a word or two out of (1) - after all
> you have to put all the necessary conditions in the WHERE
> clause or you don't get the answer you want. I'll guess the
> missing word is FIRST - in which case there is a special case
> where the statement is true, but only if you are not using Oracle 9
> properly.
>
> > 2) in the three table join situation, we should put the table which
> join
> > with the other two tables as the driving table, and put the driving
> table as
> > first table after the from clause.
> >
>
> As a general guideline, this is obviously complete rubbish
> on two counts. Consider:
> select
> a.col1,
> b.col2
> from
> join_table j,
> keyA_table a,
> keyB_table b
> where
> a.highly_selective_indexed_col = 'const'
> and j.a_key_indexed = a.key_col
> and b.key_col = j.b_key
> ;
>
> Clearly the smart join order is likely to be:
> A, J, B
> Fortunately, the cost based optimiser would
> tend to spot this regardless of the order of the
> tables in the FROM clause
>
>
> > Is this statement true?
Received on Thu Oct 02 2003 - 08:49:44 CDT

Original text of this message

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