Subject | Re: Query that never ends (Firebird 2.5.3) |
---|---|
Author | Dmitry Yemanov |
Post date | 2015-02-25T20:50:21Z |
25.02.2015 23:29, martin_gorriti@... wrote:
join t2" and hash/merge outer joins are not supported. As a result, you
get an interative re-execution of t2 for the every row in t1. Sigh.
Dmitry
>Really bad case for Firebird, as this query cannot use indices for "t1
> select t1.*, t2.* from
>
> (select a1."BJAR",a1."TKEY",a2."OWNR",a2."TIPO",a2."DSCR" as "ADSCR"
> from "TL1_1" a1 left outer join "BJAR" a2 on a1."BJAR"=a2."BJAR") t1
>
> left outer join
>
> (select b1."BJTX",b1."TKEYT",b2."OWNR" as "TOWNR",b2."BJAR",b2."DSCR" as
> "TDSCR",b2."VOCE",b2."RICH",b2."TEXT" from "TL1_2" b1 left outer join
> "BJTX " b2 on b1."BJTX"=b2."BJTX") t2
>
> on t1."BJAR"=t2."BJAR"
>
> order by t1."TKEY",t2."TKEYT"
> PLAN SORT (JOIN (JOIN (T1 A1 NATURAL, T1 A2 INDEX (BJAR_PK)), JOIN (T2
> B1 NATURAL, T2 B2 INDEX (BJTX_PK))))
join t2" and hash/merge outer joins are not supported. As a result, you
get an interative re-execution of t2 for the every row in t1. Sigh.
Dmitry