Removing Succeded jobs and Requeueing failed jobs in bulk? Hangfire extremely slow

I’m using Hangfire locally with a PostgreSQL database and I currently have >3mil succeded jobs and >175k failed jobs:

When I try do anything, such as Requeue failed jobs everything is extremely slow, even job processing has slowed down significantly. My guess is that’s because of the huge number of jobs Hangfire needs to handle in different states. I did some digging and it seems that the automatic-deletion doesn’t work in postgres:

I’ll try to implement the solution and see will it help. But what about my failed jobs, do I really need to requeue over 175k manually through the dashboard? Is there an approach I can do it in bulk through the database?