Subject Re: Slow query in Firebird/Interbase
Author bortoswatkins
--- In firebird-support@yahoogroups.com, "Alan McDonald" <alan@m...>
wrote:
> > Here is the DDL from the FB 1.03.
> >
> > CREATE TABLE LEDGER (
> > ID DOUBLE PRECISION NOT NULL,
> > ENTERED_DATE TIMESTAMP,
> > EFFECTIVE_DATE TIMESTAMP,
> > CATEGORY_ID DOUBLE PRECISION,
> > DESCRIPTION VARCHAR(50),
> > COMPANY_ID DOUBLE PRECISION,
> > LEDGER_TYPE DOUBLE PRECISION,
> > CLEARED CHAR(1),
> > MEMO VARCHAR(1000),
> > CHK_AMT NUMERIC(9,2),
> > DEPOSIT_AMT NUMERIC(9,2),
> > USERID SMALLINT);
> >
> > ALTER TABLE LEDGER ADD CONSTRAINT ILEDGER_ID PRIMARY KEY (ID);
> >
> > CREATE INDEX ILEDGER_CATEGORY_ID ON LEDGER (CATEGORY_ID);
>
> Forgive me, but why on earth do you need DOUBLE PRECISION for the
PK ID,
> CATEGORY_ID, COMPANY_ID, LEDGER_TYPE ?
> And also , this sounds like an accounting table right? Must be a
small
> company with very low demands on revenue to have checks and
deposits of
> NUMERIC(9,2), No? Better move to NUMERIC(18,2) I think.
>
> Alan

I Inherited this database.

I will keep that in mind when/if I have to rewrite the app to use MS
SQL server, since I cannot get the performance out of FB/IB.
(wish I knew why) I prefer FB.!!!!