RE: To index or not to index ? that is the (constraint) question.
Posted in 1996
Steve The unique index is implicit in the primary key constraint. Of course it = will create a real dirty looking index name, but if you dont mind = Informix doesn't either. If you want to create an explicit index, you = need to create the index BEFORE the primary key constraint. Hope this helps Sujit Pal DBA, Computer Sciences Corp. ---------- From: Steve Proctor[SMTP:Steve.Proctor@worldnet.att.net] Sent: Friday, October 11, 1996 11:35 AM To: informix-list@rmy.emory.edu Subject: To index or not to index ? that is the (constraint) question. Suppose you have a master table and a detail table. And let's suppose you have a unique constraint on the primary key of the master table and a foreign key constraint on the detail table, corresponding to this primary key. I may not have explained it very well, but the idea is that your constraints are set so that master rows can't be deleted which have detail rows! Now, back to the master table and the real question I'm asking. Given that I've got a unique constraint on the primary key column on the master table, is it necessary to also create a unique index on that column, or is that implicit in the constraint? Phew !, thanks for you indulgence, potential helpers please reply to my email address as well as the newsgroup.