Skip to main content
Question

How to perform cascading deletion in the database and avoid database disconnection issue?

  • December 19, 2023
  • 1 reply
  • 22 views

Forum|alt.badge.img

I am trying to perform cascading deletion in the database but because the records are many and the deletion is happening in many tables, this takes a long and the database gets disconnected after a while. How to solve this?wsdeletion

1 reply

ctredinnick
Supporter
Forum|alt.badge.img+19
  • Supporter
  • December 21, 2023

If the problem is that too many uuids can cause it to timeout, you could try send it as multiple delete statements, with a limited number of uuids (ie one) per delete.

Or you can increase the wait time in the SQLExecutor to like 300 seconds instead of the default 30.

A where clause like you have can also be used to delete using a writer, maybe that will have different behaviour.