Re: Which is faster?

From: Torben Jeppesen <torbenkj_at_post2.tele.dk>
Date: Tue, 29 Dec 1998 20:00:12 +0100
Message-ID: <368942e3.0_at_news.euroconnect.dk>


[Quoted] It does not make any difference in this case.

Make shure, however to make Oracle compute statistics on both tables (which in turn will force you to compute statistics on ALL tables in) because there are several passible access paths and several ways of doing the join.

With computed statistics the optimizer will literally find the best access path in 95 % of all cases, and in many cases the SQL will be "rewritten" internally to be most cost-efficient independent of the order you write the conditions in.

Use EXPLAIN PLAN or TKPROF to evaluate your experiments.

/Torben Jeppesen

wychan wrote in message <3688F473.AB057648_at_vol.net>...
>Which of the following select statement is running faster:
>
>select * from table_a, table_b
>where table_a.column_1 = table_b.column_1
>and table_a.column_2 > 10;
>
>
>select * from table_a, table_b
>where table_a.column_2 > 10
>and table_a.column_1 = table_b.column_1
>
>Or they are homogenous?
>
>Thanks for any advice,
>River
>novice DBA
>
Received on Tue Dec 29 1998 - 20:00:12 CET

Original text of this message