Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Can't think of a subject...
kplasun_at_hotmail.com (kris p) wrote in message news:<db13b49.0402031808.487873ef_at_posting.google.com>...
> A question about SQL statement structure...
>
> I have a query with a number of joins and my question
> is does the order of the tables listed after the FROM
> have any impact in which order the tables are joined?
>
> What about the order of the statements after the WHERE
> clause, do they affect the order in which a statement
> is executed?
>
> Thanks,
> kristoff plasun
1 rbo (DEAD) : if RBO can not decide, will order from right to left cbo : if CBO can not decide, will order from left to right
2 it depends. Lack of parentheses will cause default arithmetic
priorities being applied. If you have
where a = .. and b = ... and c = ... and d = ...
and b,c are in one table and indexed you will likely end up with
disaster as (RBO definitely) will treat this as
(a and b) and (c and d)
Apart from that: CBO changes with every release and generic queries without the exact version number are likely met with generic responses.
Sybrand Bakker
Senior Oracle DBA
Received on Wed Feb 04 2004 - 08:06:34 CST