Re: Question about regular delete and cascading delete.
Posted in 1997
Ramamurthy Ramesh wrote: > I am trying to reduce the number of lock requests during a delete > statements. There is a posibility that I will be able to use a cascading > delete if this will reduce the number of lock requests. Can somebody tell > me whether cascading delete is the path which I should be taking in order > to reduce the lock request. A large number of rows get deleted during the > process. Whatver gave you the idea that a cascading delete would save locks? Every delete in a transaction imposes key-value locks (on unique-key values) and other relating to integrity checking. Because the transaction is still happening and this was not just a look-see, the locks hang around until the end of the transaction. What do you save if you use cascading deletes? 1. Coding - One DELETE statement to execute or PREPARE 2. Interprocess communication - One DELETE statement instead of several But you don't save on locks. By the way, you must have transactions available in order to run a cascading delete. > My company is not responsible for My comments You really should not be keeping company with irresponsible people! ;-) -- -- Jake (In pursuit of undomesticated aquatic avians) +-----------------------------------------------------------+ | Impeccable Logic: A thought process which successfully | | resists chicken bites | +-----------------------------------------------------------+