Subject Re: [firebird-support] Re: Determining Join Order
Author Ann W. Harrison
Tom Conlon wrote:
>
> Ok - the plan also show the order?
>
> 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?

Right. Inside to outside, and within a level top to bottom.
Starting with the natural retrieval is much better than doing
it in a loop - unless the table is very small.

Regards,


Ann