Would it be possible to first scan for the ids of things that are candidates to be deleted (into a temp table) and then subsequently delete in (modest) batches?

The delete can effectively check that they are still deletable and the query plan should be OK.

The locking profile should be better, and if the process is interrupted so its stopped half-way, then I would think it OK.

Reply via email to