If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Manually create indexes for constraints or no need?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-30-11, 11:25
alvescarlos alvescarlos is offline
Registered User
 
Join Date: Aug 2011
Posts: 1
Manually create indexes for constraints or no need?

Hello to all,

I work in a software development department where it has been assumed for several years that when creating constraint objects (primary, reference or check) on our development/production Informix databases, one should always manually create before the respective index. This allows for following some naming rules, like the index to have the same name as the constraint. But if no index is created, Informix always creates one automatically for the given columns of the constraint (even though it has that numerical nomenclature).

So I'd like to know what is generally assumed as the best practice: should one manually create the index or from a strictly practical point of view, is the one automatically created by Informix simply enough?

Thank you very much for your kind help.

Carlos
Reply With Quote
  #2 (permalink)  
Old 09-20-11, 00:56
BrentNZ BrentNZ is offline
Registered User
 
Join Date: Sep 2011
Posts: 3
Naming indexes

I'm not sure there is a "best practise".

Personally, I always name by indexes and constraints purely to void the Informix numeric naming scheme. I put pk_ on the front of primary keys, u_ in front of unique indexes, i_ on the front of indexes, and c_ on the front of constraints, so I can tell which is which.

But I don't think it makes any difference really.

Cheers,
Brent.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On