256,338 rows affected.

    • whats_a_lemmy@midwest.social
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      8 months ago

      You can just insert directly to the helper/audit table, and delete using it, no need for the cursor loop. If you need a handle to go through the records one by one, something else has already gone wrong.