Running a DELETE statement is going to be tediously slow if your database has grown really really big.
The fixup in 1.41.8 creates a new temporary table, copies the good rows from the old table and then drops the old table entirely. This is much faster than doing delete operations but still will take a bit especially during the vacuum.
If you want to trigger this process manually (and not wait for the weekly scheduled task) you can call the following request:
POST http://localhost:32400/butler/OptimizeDatabase?X-Plex-Token=:yourtoken
Curl command:
curl -X POST \
'http://localhost:32400/butler/OptimizeDatabase?X-Plex-Token=:yourtoken' \
This assumes you’re running the command on the same machine as PMS is running, otherwise replace the http://localhost part.