Subject Re: Order of key elements
Author Aage Johansen
SET wrote:
<<
>What is the effective difference between these two key elements orderings?
>ALTER TABLE T ADD CONSTRAINT U UNIQUE (PK, HIGH_MAX_DUP)
>ALTER TABLE T ADD CONSTRAINT U UNIQUE (HIGH_MAX_DUP, PK)

If PK is the primary key of T, then I'd say that a UNIQUE constraint
is basically a 'relaxed version' of the primary key and that neither
of these constraints make any sense (the PK itself assures
uniqueness). ... ...
>>

IIRC, adding the primary key to a not-very-selective indexed field
was a trick that one could use with old versions of Interbase and
Firebird. It reduced the problem of very slow deletes (and possibly
garbage collection) of records when its index was at the end of very
long chains of duplicate indexes.


--
Aage J.