Thanks to all who replied.
following is what I have gathered after some r&d:
- locks
Oracle generates internal locks on dict tables to maintain the data
integrity.
e.g.: I deleted a record from detail table in one session. In another
session I tried to delete a master record not related to the deleted detail
record. The 2nd session hanged. There were row-exclusive locks present on
the detail table and an exclusive lock present on an internal table (I
couldn't access). The same is the case with update.
Oracle locks both the master & detail table records when the master record
is deleted and the foreign key is created with on delete cascade option.
Bottomline, Oracle doesn't allow altering of master table primary key when
active transactions exists on detail table. Oracle will allow update of
columns other than the primary key.
-imp & exp
While importing and exporting, oracle throws an error if the table
structure already exits and the detail records are being inserted first.
This error can be avoided by disabling the foreign key. No error is
generated if the table structure is being recreated from the dump, as oracle
takes care of enabling the foreign key constraint after importing rows.
- triggers
Delete (for each row) trigger on master table will mutate if detail table is
being referred in the trigger. This will only happen if the foreign key on
the detail table is created with on delete cascade option.
No mutation occurs if master table is being referred in a trigger on the
detail table.
rgds
amar
-----Original Message-----
Hi,
my current project database has no primary/ foreign key constraints. Curious
about this basic check missing in the system, I was informed that these
constraints result in lot of locking issues and would be a bottleneck to
huge OLTP Systems.
As per my knowledge, locking of master as well as detail would only occur if
one is trying to delete a master record the corresponding details records
exists. In this case both master and detail records are locked (on delete
cascade option).
Has anyone come across such issues in huge dbs, where using these
constraints actually resulted in performance issues?
rgds
amar
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Amar Kumar Padhi
INET: [EMAIL PROTECTED]
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).