Subject | Performance problem - Migration from Interbase 6.0 to Firebird 2.01 |
---|---|
Author | Sugiarto |
Post date | 2007-09-06T03:03:02Z |
Hi all,
I just finished my work to migrate from IB to FB. Everything works fine except that the query that usually runs quickly, now still runs very-very slowly.
This is the query
select t.id_db, t.stp_frm, t.brk_typ, t.crt_n, t.id_frm, t.cncl, t.nml, t.old_nml, t.old_int_amnt, t.nml_intr_brk, t.crrny, t.trs_dt, t.int_amnt, t.trsfr_nml_ac, t.trsfr_nml_bnk, t.fnl_mt_dt, t.trsfr_nml_nm, t.is_new
from t_db t
where t.crrny = 'Rp'
and t.IS_PBLSH = 'T'
and t.stp_frm in ('S','B')
and (t.cncl is null or t.cncl <> 'T' or (t.cncl='T' and t.is_new = 'T' and t.stp_frm='S'))
and t.id_db not in (select a.id_frm from t_db a
where a.id_frm = t.id_db
and a.id_db in (select id_db from t_cst_trsfr2
where trsfr_typ in('S', 'B')))
and t.id_db not in (select b.id_db from t_cst_trsfr2 b
where b.trsfr_typ in('S', 'B'))
The last two lines statement ->'and t.id_db not in (select b.id_db from t_cst_trsfr2 b where b.trsfr_typ in('S', 'B'))', caused this delay. Without this 2 lines, query runs quickly.
For your info, t_db records are 34749 rows and 70 columns.
t_cst_trsfr2 are 70576 rows and 16 columns.
Can anyone give me a suggestion/solution to this matter?
Thanks in advance,
Best regards
Sugiarto.
[Non-text portions of this message have been removed]
I just finished my work to migrate from IB to FB. Everything works fine except that the query that usually runs quickly, now still runs very-very slowly.
This is the query
select t.id_db, t.stp_frm, t.brk_typ, t.crt_n, t.id_frm, t.cncl, t.nml, t.old_nml, t.old_int_amnt, t.nml_intr_brk, t.crrny, t.trs_dt, t.int_amnt, t.trsfr_nml_ac, t.trsfr_nml_bnk, t.fnl_mt_dt, t.trsfr_nml_nm, t.is_new
from t_db t
where t.crrny = 'Rp'
and t.IS_PBLSH = 'T'
and t.stp_frm in ('S','B')
and (t.cncl is null or t.cncl <> 'T' or (t.cncl='T' and t.is_new = 'T' and t.stp_frm='S'))
and t.id_db not in (select a.id_frm from t_db a
where a.id_frm = t.id_db
and a.id_db in (select id_db from t_cst_trsfr2
where trsfr_typ in('S', 'B')))
and t.id_db not in (select b.id_db from t_cst_trsfr2 b
where b.trsfr_typ in('S', 'B'))
The last two lines statement ->'and t.id_db not in (select b.id_db from t_cst_trsfr2 b where b.trsfr_typ in('S', 'B'))', caused this delay. Without this 2 lines, query runs quickly.
For your info, t_db records are 34749 rows and 70 columns.
t_cst_trsfr2 are 70576 rows and 16 columns.
Can anyone give me a suggestion/solution to this matter?
Thanks in advance,
Best regards
Sugiarto.
[Non-text portions of this message have been removed]