Index on foreign key constraint
Posted in 1999
Topics: Triggers, Constraints & Referential Integrity
Why does Informix create a duplicate index on columns used in foreign-key constraints?
Red - It shouldn't make a duplicate. Something must be different about the one you generated and the one it generated. TRY THIS: Generate the needed index yourself *first*, and then install the foreign key constraint with "alter table add constraint...". It should definitely work this way. Red Valsen wrote: > Why does Informix create a duplicate index on columns used in > foreign-key constraints? -- Richard C. Auslander Database Manager AirFlash, Inc. 1733 Woodside Rd., Suite #110 Redwood City, CA 94061 (650) 556-7928 www.airflash.com
If that column can be null, and since there could then be multiple nulls in the table, having an index with duplicates would make sense. Nulls in a foreign key column are allowed (not only in Informix) so that you can store rows where the foreign key constraint may not apply... Red Valsen wrote in message <379DBDB9.639C90A2@yahoo.com>... >Why does Informix create a duplicate index on columns used in >foreign-key constraints? >