Situation:
- table TBL has ~10k entries for deletion
- table TBL has 14 child tables with delete rule "no action"
- I want to delete 10k entries and referenced entries in child tables
Procedure:
- delete records in child tables
- disable constraints (if constraints are not disabled deletion in next step takes forever)
- delete records in TBL table
- enable constraints
Is there more elegant way for doing this?
[edit] Problem is that third step takes too long because it is checking 14 big tables for existence of non existent records. My procedure has good execution time but I think that there is more elegant way.