| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Oracle triggers = poor performance ??
I've heard Oracle triggers really impact performance. I'm using ErWin and
am trying to decide if I should use triggers to enforce RI in addition to my
foreign key constraints. With triggers, for example, I have the ability to
cascade, restrict or orphan child nodes when a parent is either inserted,
updated, or deleted. Can I get that flexibility with keywords off of the
constraints (e.g. cascade delete)???
Here's a typical cascade delete trigger: (table address has two children, useraddress and propertyaddress)
Thoughts????
thx in adv.
-Ed
declare numrows INTEGER;
begin
/* ERwin Builtin Thu Jul 29 13:47:02 1999 */
/* Address R/268 UserAddress ON PARENT DELETE CASCADE */
delete from UserAddress
where
/* %JoinFKPK(UserAddress,:%Old," = "," and") */
UserAddress.AddressID = :old.AddressID;
/* ERwin Builtin Thu Jul 29 13:47:02 1999 */
/* Address R/266 PropertyAddress ON PARENT DELETE CASCADE */
delete from PropertyAddress
where
/* %JoinFKPK(PropertyAddress,:%Old," = "," and") */
PropertyAddress.AddressID = :old.AddressID;
![]() |
![]() |