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

>> Did you run backup/restore before using in under FB2?
> No backup/restore. I ran the DDL scripts to create the domains and
> tables, copied over the data, then the scripts to create the
> constraints, indexes, views, and stored procedures.

Ok, i understand on a new created database under FB2? Thus which has ODS11.

> Data may be slightly different as the snapshots are a few days apart.
>
> FB 2.0

Damn outlook wrapped those lines, but..

> ACT_CHC_PHARM_SUBACCT PK_ACT_CHC_PHARM_SUBACCT 0 0
> CHC 0
> ACT_CHC_PHARM_SUBACCT PK_ACT_CHC_PHARM_SUBACCT 0 1
> PHARMACY 0

Run :
SET STATISTICS INDEX PK_ACT_CHC_PHARM_SUBACCT;

> PBM_CLAIM PK_PBMCLAIM 0 0
> ID 0

Run :
SET STATISTICS INDEX PK_PBMCLAIM;

> RXS_CLM_CALC_FEES PK_RXSCLMCALCFEES 0 0
> CLAIM_ID 0


Run :
SET STATISTICS INDEX PK_RXSCLMCALCFEES;

And try your queries again.

I think it would be better to run once SET STATISTICS for every index.
You could write an simple script with the EXECUTE BLOCK statement that does that for you.

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!