Your approach of deleting the grandchildren, then children then parent is the same one I use. If you have foreign keys defined, then the DELETE statements will benefit from an index on the column. The foreign key is there to provide referential integrity, but the performance gain comes from the index.