Subject Re: [firebird-support] FB 2.0 optimizer dogging us
Author Arno Brinkman
Hi,

> 2.0 takes 8.8 seconds, 1.5 takes 0.11 seconds.
>
> 2.0
> PLAN SORT (JOIN (V_SUBACCT_CLAIMFEES CP NATURAL, V_SUBACCT_CLAIMFEES CPR
> INDEX (FK_PBMCLAIM_ACTCHCPHARMSUBACCT), V_SUBACCT_CLAIMFEES CCF INDEX
> (PK_RXSCLMCALCFEES)))
> 1.5
> PLAN SORT (JOIN (V_SUBACCT_CLAIMFEES CCF INDEX
> (FK_CCF_GRANTEEINVOICE),V_SUBACCT_CLAIMFEES CPR INDEX
> (PK_PBMCLAIM),V_SUBACCT_CLAIMFEES CP INDEX (PK_ACT_CHC_PHARM_SUBACCT)))

Did you run backup/restore before using in under FB2?
Can you check the statistics on the indexes for those tables?

Run this statement on both databases (1.5 and 2.0) and let know the result:

SELECT
i.RDB$RELATION_NAME,
i.RDB$INDEX_NAME,
i.RDB$STATISTICS,
ins.RDB$FIELD_POSITION,
ins.RDB$FIELD_NAME,
ins.RDB$STATISTICS
FROM
RDB$INDICES i
JOIN RDB$INDEX_SEGMENTS ins ON (ins.RDB$INDEX_NAME = i.RDB$INDEX_NAME)
WHERE
i.RDB$RELATION_NAME in ('RXS_CLM_CALC_FEES', 'PBM_CLAIM', 'ACT_CHC_PHARM_SUBACCT')
ORDER BY
i.RDB$RELATION_NAME, i.RDB$INDEX_NAME, ins.RDB$FIELD_POSITION


Firebird 2.0 should be faster or equal to 1.5 in most cases, but ofcourse there are always
exceptions.


Regards,
Arno Brinkman
ABVisie

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
General database development support:
http://www.databasedevelopmentforum.com

Firebird open source database (based on IB-OE) with many SQL-99 features :
http://www.firebirdsql.org
http://www.firebirdsql.info
http://www.fingerbird.de/
http://www.comunidade-firebird.org/

Support list for Firebird and Interbase users :
firebird-support@yahoogroups.com

Nederlandse firebird nieuwsgroep :
news://newsgroups.firebirdsql.info

--------------------------------------------------------------------------------
Mijn Postvak In wordt beschermd door SPAMfighter
954 spam-mails zijn er tot op heden geblokkeerd.
Download de gratis SPAMfighter vandaag nog!