Re: optimizing where clause?

From: Sinisa <popsin_at_eunet.yu>
Date: Tue, 16 Jan 2001 19:32:44 +0100
Message-ID: <943b4t$j6o$2_at_SOLAIR2.EUnet.yu>


Thanks.
May I make another question?
I make joins over many fields in where clause: select * from t1, t2, t3
where t1.field1 = t2.field1
and t1.field2 = t2.field2
and t2.field1 = t3.field1
...
Does order of joined fields in the where clause have any impact on performance?

Sinisa
VB Programmer
PanBit

<sigdock_at_my-deja.com> wrote in message news:940uaq$2tk$1_at_nnrp1.deja.com...
> AFAIK, the last one will be evaluated first. This means that the most
> selective clause should be put at the end. However, this only works if
> your OPTIMIZER_MODE is set to RULE or to CHOOSE and the database is not
> analyzed.
>
> h.t.h.
>
> BertJan Meinders
> Oracle DBA
> ASR-ICT
>
> In article <940mvf$dp7$1_at_SOLAIR2.EUnet.yu>,
> "Sinisa" <popsin_at_eunet.yu> wrote:
> > Hi,
> >
> > I have one question:
> >
> > if I have many filters in where clause joined with AND operator:
> >
> > SELECT * FROM bla, bla
> > WHERE something = a
> > AND something = b
> > AND something = c
> >
> > which one will be executed first: the first one or the last one.
> > I want to optimize this query but I don't know which one to put
 first. I
> > know that the most restrictive filter should be executed first, but I
 don't
> > know in which order will Oracle execute them.
> >
> > Sinisa
> >
> >
>
>
> Sent via Deja.com
> http://www.deja.com/
Received on Tue Jan 16 2001 - 19:32:44 CET

Original text of this message