From: --CELKO-- on 10 Feb 2010 19:44
>> I have met one client when he implement REFERENCES .. ON DELETE CASCADE on huge tables and it caused terrible locking on the system <<
Without further information, I would guess lack of indexing, too.
Doing an elaborate cascade is still a mess with a stored procedure --
hell, setting up the rollbacks and error messages manually is
But that is not the real points.
DRI actions can be optimized and ported; triggers and procs cannot.
DRI actions are not skipped. I had one employer who did not implement
REFERENCES .. ON DELETE CASCADE on huge tables. Some stuff got
deleted; some stuff got orphaned. Ever try to audit and correct
~5,750,000 rows in a system that cannot go off line?