Subject Re: Determining Join Order
Author Tom Conlon
>> Can someone confirm what the 'last stream' in the following 2 cases:
...

> Sure, but it depends on the population of the tables and the
> available indexes and their selectivity. The way to find out
> what the optimizer thinks is the best ordering is to get the
> plan for the query on the data it will run against.

Ok - the plan also show the order?

e.g.

PLAN SORT
(
JOIN
(
DW6 NATURAL,
DW7 INDEX (IDXDOCUMENTWORD_DOCID),
DW5 INDEX (IDXDOCUMENTWORD_DOCID),
DW2 INDEX (IDXDOCUMENTWORD_DOCID),
DW1 INDEX (IDXDOCUMENTWORD_DOCID)
)
)

Is the order of execution dw6 (then joining dw7, dw5, dw2, dw1 in that
order) lastly the sort?

Thanks,
Tom