Hi,
i prepare test comparison between FB2.5 vs FB3.0RC1 and found this regression
both databases was restored from same backup file (db are the same)
WI-V3.0.0.32172 Firebird 3.0 Release Candidate 1
WI-V2.5.3.26738 Firebird 2.5
SELECT
W.*
FROM
WPLATA W
WHERE
W.WPLATA_KWOTA > 0
AND W.WPLATA_KONTRAHENT_ID IN(940)
AND W.DYR_ID = 14
ORDER BY
W.DYR_ID
, W.INSP_ID
, W.KONTO_ID
, W.WPLATA_DATA_WYCIAGU
, W.WPLATA_NR_WYCIAGU
, W.WPLATA_NR_POZYCJI
CREATE INDEX IXA_WPLATA__KONTRAHENT__PK ON WPLATA
(WPLATA_KONTRAHENT_ID,DYR_ID);
statistics both 0.000007
CONSTRAINT WPLATA_PK PRIMARY KEY
(DYR_ID,INSP_ID,KONTO_ID,WPLATA_DATA_WYCIAGU,WPLATA_NR_WYCIAGU,WPLATA_NR_POZYCJI)
statistics both 0.000000
FB2.5
PLAN (W ORDER WPLATA_PK INDEX (IXA_WPLATA__KONTRAHENT__PK))
time: 47 ms
FB3.0
PLAN (W ORDER WPLATA_PK)
Select Expression
-> Filter
-> Table "WPLATA" as "W" Access By ID
-> Index "WPLATA_PK" Range Scan (partial match: 1/6)
time: 3572 ms
--------------------------------------------------------------------------
select
w.umowa_id
, w.dyr_id
, w.umowa_id_seq
, w.umowa_id_poz
, w.rodz_dzial_id
, w.war_adres_ul_skrot
, w.war_adres_ulica
, w.war_adres_kod_poczt
, w.war_adres_miejscowosc
, w.war_data_od
, w.war_data_do
, w.war_ryczalt
, w.war_okres
, w.war_procent
, w.war_procent2
, w.miejsce_nazwa
, w.war_uwagi
, w.war_zlecfakt_ryczalt
, w.war_zlecfakt_opust_proc
, w.war_zlecfakt_opust_ryczalt
, u.ulica_skrot_text
, rd.rodz_dzial_nazwa
, oj.oplataj_opis
from
warunki w
left join ulica_skrot u on w.war_adres_ul_skrot = u.ulica_skrot_id
left join umowa um on w.dyr_id = um.dyr_id and w.umowa_id = um.umowa_id and
w.umowa_id_seq = um.umowa_id_seq
left join rodzaj_dzial rd on w.dyr_id = um.dyr_id and w.umowa_id = um.umowa_id
and w.umowa_id_seq = um.umowa_id_seq and um.typ_umowy_id = rd.typ_umowy_id and
um.rodz_umowy_id = rd.rodz_umowy_id and w.rodz_dzial_id = rd.rodz_dzial_id
left join oplataj oj on w.war_okres = oj.oplataj_id
where
w.dyr_id = :dyr_id
and w.umowa_id = :umowa_id
and w.umowa_id_seq = :umowa_id_seq
order by
w.umowa_id_poz
FB2.5
PLAN JOIN (JOIN (JOIN (SORT (JOIN (W INDEX (WARUNKI_FK1), U NATURAL)), UM INDEX
(UMOWA_PK)), RD INDEX (RODZAJ_DZIAL_PK)), OJ INDEX (OPLATAJ_PK))
FB3.0
PLAN JOIN (JOIN (JOIN (JOIN (W ORDER WARUNKI_PK, U NATURAL), UM INDEX
(UMOWA_PK)), RD INDEX (RODZAJ_DZIAL_PK)), OJ INDEX (OPLATAJ_PK))
Select Expression
-> Filter
-> Nested Loop Join (outer)
-> Nested Loop Join (outer)
-> Nested Loop Join (outer)
-> Nested Loop Join (outer)
-> Filter
-> Table "WARUNKI" as "W" Access By ID
-> Index "WARUNKI_PK" Range Scan (partial
match: 3/4)
-> Filter
-> Table "ULICA_SKROT" as "U" Full Scan
-> Filter
-> Table "UMOWA" as "UM" Access By ID
-> Bitmap
-> Index "UMOWA_PK" Unique Scan
-> Filter
-> Filter
-> Table "RODZAJ_DZIAL" as "RD" Access By ID
-> Bitmap
-> Index "RODZAJ_DZIAL_PK" Unique Scan
-> Filter
-> Table "OPLATAJ" as "OJ" Access By ID
-> Bitmap
-> Index "OPLATAJ_PK" Unique Scan
regards,
Karol Bieniaszewski
------------------------------------------------------------------------------
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel