Subject Re: [firebird-support] Index question
Author Christian Gütter
Hi Helen,

> I wonder whether Christian is testing this on a table with very
> few rows in it...natural sort order would make sense in that case.

Its a table with 20K rows and the select takes 8 seconds.

> Or this could be a situation of duplicated indexes. Is firma linked > to another table by a foreign key, perhaps?

No, it is not. There are are tables linked to firma.
This is the DDL of the indices etc:

ALTER TABLE T_KUNDEN ADD CONSTRAINT UNQ_T_KUNDEN_KID UNIQUE (KID);
ALTER TABLE T_KUNDEN ADD CONSTRAINT PK_T_KUNDEN PRIMARY KEY (ID);
CREATE INDEX T_KUNDEN_FIRMA ON T_KUNDEN (FIRMA);
CREATE INDEX T_KUNDEN_NACHNAME ON T_KUNDEN (NACHNAME);

So AFAIU there should be no duplicate indices, right?
AFAIK creating a foreign key in a child table of firma does create
an index in the child table, but not in the firma table, right?


TIA,
Christian