Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Index on Composite key to solve enq: TM - contention

886282Dec 23 2013 — edited Dec 23 2013

Version : Oracle 10g

Hi ,

I have got enq: TM - contention in my database , and I want to apply the index on the foreign key column of one of the table.

But I see there are composite foreign keys as well as single foreign keys in the table.

Single foreign key I can easily create the index, but what my doubt is that , for composite foreign key ,

Do I have to create the composite index on the composite foreign key columns or on each column of composite key , I have to apply index to resolve the enq: TM - contention issue.

For Example : I have foreign key as below

CONSTRAINT "FK_RECONDATA_DRIVER" FOREIGN KEY ("FNR", "DADDRESSTYPE", "DADDRESSNR")
  REFERENCES "PASS"."FAZGFUEHRER" ("FNR", "ANSCHTYP", "ANSCHNR") ENABLE,
CONSTRAINT "FK_RECONDATA_PRODUCT" FOREIGN KEY ("FNR", "PRODUCTNR")
  REFERENCES "PASS"."SORTE" ("FNR", "SORTENNR") ENABLE

here FNR column is common in both the foreign key,

Please help me in finding how to create index on such columns.

This post has been answered by Mohamed Houri on Dec 23 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 20 2014
Added on Dec 23 2013
5 comments
832 views