Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Q: Conditions order in WHERE clause
huh wrote:
<snip>
> Does somebody know in what order are WHERE
> conditions evaluated? Is it determined or is the final
> decision made by an optimizer?
>
> E.g.:
> select ...
> from ...
> where A1.A = 5 -- c1
> and A1.B = A2.B -- c2
> and A1.C = A3.C (+) -- c3
> and A2.D is NULL -- c4
>
> Is this evaluated as it is written? :
> c1 first then c2, c3 and finally c4?
This is correct for the rules based optimiser, I'm not sure about the cost based. One interesting point though, I think that OR's are evaluated from the bottom up. Maybe one of the guru's can confirm this.
Regards,
Darren
Received on Thu Jul 29 1999 - 05:20:20 CDT