Making the mysql deletion cleaner to touch only those tables that have new records in them