I have a table called accounts that is extremely large ~600,000+. From this table, I need to delete about 1/3 of the accounts. On the accounts table are many references to different tables. What I want to do is to delete the accounts by batches to speed up the process but it looks like the Rails delete
method does not do that.
So that is my question. Does the delete
method trigger the DELETE CASCADE
command? I tried it out on the rails console and it would seem that it in fact does not trigger a DELETE CASCADE
. Is the only purpose of the delete
method is to not trigger rails callbacks? Is there a different method that I can look into?