Subject | Re: [firebird-support] Index question |
---|---|
Author | Helen Borrie |
Post date | 2003-11-27T09:52:37Z |
At 10:30 AM 27/11/2003 +0100, you wrote:
for the sort.
heLen
>Hi Helen,No sign of dup indexes there. Try Ivan's suggestion - a dedicated index
>
> > 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?
for the sort.
heLen