If you don't need the data for more then a transaction, or connectionlength - use temporary tables to store ids of data you need to delete.If those change, or move, or something - it means you are missing PKon that table.