Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2011
    Posts
    1

    Unanswered: 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

  2. #2
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •