Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: index on foreign key
Yes they should. Otherwise, you get into some locking issues. If you do not have indexes, what happens on insert or update of the column, a lock is placed on the parent table, thus, if someone performs an update or insert on the same column same foreign key value, the second person will be blocked. With an index on the foreign key column, a row level lock is placed on the particular role in the parent table.
HTH
Toby T.
In article <139473e4.4b2b2923_at_usw-ex0106-047.remarq.com>, mcomer
<mcomer2NOmcSPAM_at_hotmail.com.invalid> wrote:
>In an Oracle database, should all foreign key columns have
>indexes?
>
>Marc
>
>* Sent from RemarQ http://www.remarq.com The Internet's
Discussion Network *
>The fastest and easiest way to search and participate in
Usenet - Free!
>
>