Closed
Description
Performance using Postrges was greatly improved with the fix from #8711.
But looking at our database performance view I think there is still room to improve.
We could use the DELETE ... RETURNING
clause to make this a single statement operation.
The select and delete statements are still the biggest contributors to wait time for polling.
I'd be happy to contribute a PR for this, but first like to discuss wether you'd accept it.