Menu

#196 Informix 12.10: unique index reported with wrong columns

N/A
open
nobody
None
5
2018-01-03
2018-01-03
No

Hi,

I am working with the last avalable version (6.0.0.rc1). I have noticed that "sometimes" the unique indexes were reported wrongly in the xml file. Namedly, in this file, indexes are reported with more columns than they actually have. For instance, in the example provided, (rfe.informix.xml), for the table rfe_items, the index d_item_product is reported like this:

<index name="d_item_product" unique="false">
            <column ascending="true" name="bsns_justification"/>
            <column ascending="true" name="comments_internal"/>
            <column ascending="true" name="decision_comments"/>
            <column ascending="true" name="description"/>
            <column ascending="true" name="use_case"/>
            <column ascending="true" name="prod_brand"/>
            <column ascending="true" name="prod_family"/>
            <column ascending="true" name="prod_name"/>
</index>

should be in fact like this

<index name="d_item_product" unique="false">
            <column ascending="true" name="prod_brand"/>
            <column ascending="true" name="prod_family"/>
            <column ascending="true" name="prod_name"/>
</index>

the extra columns ( bsns_justification,comments_internal,decision_comments,description,use_case) have absolutely no reason to be included in the index

I have the same case for the following index u_rfe_item that has columns that shouldn't be there

I have trying deleting the whole output folder and generating again, and nothing changes

1 Attachments

Discussion

  • Eric Vercelletto

    Here is the actual database schema for test purpose

     
  • Eric Vercelletto

    And by the way: Happy New Year!

    It seems that a secondary effect is that the fact that the index has too many columns that it prevents to generate an implied relationship between the table rfe_item and product_lov on prod_name, prod_brand and prod_fam.

    I understood "implied constraints" occur when a column has the same name, type and length in another table, and has a unique index or primary key in the other table. Does this occurs with composite indexes too?

     

Log in to post a comment.