Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Forcing Oracle to use an order in the from clause
In article <3357F808.7DD3_at_pop-milpitas.lsil.com>, Boris Panteleev
<borispan_at_pop-milpitas.lsil.com> writes
>
>amit srivastava wrote:
>>
>> Can you force Oracle to use a particular table order in the
>> from clause? Esp. if you have outer joins in them?
>>
>> Thank you for any information.
>> -amit
>
>You can.
>By default Oracle reads the last table in the FROM clause FIRST.
>So when you optimize your queries make sure the order of the tables
>listed in FROM consistent with their row number and overall size.
>Also make sure that the most restrictive table is processed first..this
>will reduce significantly the overall number of join rows that are
>spooled in the memory/alternatively temp space.
>
>Boris
This isn't really true any more. With the cost based optimiser, order of
tables has no effect. Under the rule based optimiser, if it couldn't
select a driving table after applying its rules to the where clause,
then it would take the order of tables into account.
-- Jim SmithReceived on Sat Apr 19 1997 - 00:00:00 CDT
![]() |
![]() |