Subject | Re: [firebird-support] Index question |
---|---|
Author | Christian Gütter |
Post date | 2003-11-27T09:30:15Z |
Hi Helen,
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
> I wonder whether Christian is testing this on a table with veryIts a table with 20K rows and the select takes 8 seconds.
> few rows in it...natural sort order would make sense in that case.
> 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