Subject Re: [firebird-support] Re: Query that never ends (Firebird 2.5.3)
Author

Thank you Carlos!. Yes, it is a way. But it seems I fixed it:


select t1.*, t2.* from

(select a1."BJAR",a1."TKEY",a2."OWNR",a2."TIPO",a2."DSCR" as "ADSCR" from "TL1_1" a1 join "BJAR" a2 on a1."BJAR"=a2."BJAR") t1

left outer join

(select b1."BJTX",b1."OWNR" as "TOWNR",b1."BJAR",b1."DSCR" as "TDSCR",b1."VOCE",b1."RICH",b1."TEXT",b2."TKEYT" from "BJTX" b1 join "TL1_2" b2 on b1."BJTX"=b2."BJTX") t2

on t1."BJAR"=t2."BJAR"

order by t1."TKEY",t2."TKEYT"


Sed gave me and idea ... I did some aceptable changes in t1 and t2 and now it is very fast. Simply removed "left outer join" to "join" because "left outer" is not necessary for t1 and t2; also I switched b1 and b2 in t2.


It seems it returns what I need, and it is very fast.


Best regards.