It seems to be taking approx 1/3 seconds per track ... so what was a 9 minute job is now 5+ hours.
Once I noticed this, I turned run the Debug Logger for a while. Much of the delay seems to be due to waiting for a db lock
A similar thing for the same query, for every track.DB lock took 266 ms : DELETE FROM DeviceTracks WHERE ((DevicePath=? AND DevicePath <> '') OR (SyncID=? AND SyncID<>'')) AND IDDevice = ?
I left it running overnight ... logging turned off
It didn't complete. You excelled yourself with this diagnostic message ... all you have to do is look for, and fix, something "unknown".
No log. No attempt to dispatch a crash dump to you.
? Maybe my PC's power plan caused this ... it is set to sleep after 2 hours inactivity.
I restarted the job in the morning and it ran for a further 2 hours, and completed OK
I have debug logs if you need them, but I suspect that you don't.