I have two tables Parent table and the Child table.
The Child table has foreign keys refering to the Parent table.
Both the tables contain around 1 lack rows, now I want to delete all the rows in both the tables.
It takes around 1 min for the Child table to be cleared but for Parent table it takes 30 minutes.
So I dropped the Foreign key relation and then the Parent table is also cleared in 1 min.
Then I again assign the foreign keys to the child table before a fresh insertion.
So is this thing has any disadvantages, and is there any other way to perform the above steps. I also tried CASCADE ON DELETE for Child table but then also it is taking 30 minutes to delete the data from both the tables.