Archives of the TeradataForum
Message Posted: Mon, 18 Oct 2004 @ 10:16:05 GMT
Dieter replied (and I'm grateful to Dieter)
However, when I tried this on our development box, using this sort of syntax:
REPLACE TRIGGER DEVCS_T.BOOKINGORDER_TR1 AFTER DELETE ON DEVCS_T.BOOKINGORDER REFERENCING OLD AS o FOR EACH ROW ( DELETE FROM DEVCS_T.ORDERCONDETAIL ch1 WHERE ch1.ORD_SRKY_ID=o.ORD_SRKY_ID; DELETE FROM DEVCS_T.ORDERCONDETOPT ch2 WHERE ch2.ORD_SRKY_ID=o.ORD_SRKY_ID; );
it virtually brought the box to its knees (its V2R5).
It was trying to delete around 100k parent and its associated children.
Has anyone used Delete Triggers for mass deletes in this way with any success? And if so, how did you code it (although I can't imagine there's too many variations)?
By the way, I did start out using Cascading Triggers but then thought that the approach above was much simpler.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 27 Dec 2016|