The Death Penalty is not a deterrent. It is done behind closed doors and the deterrent effect is never seen. They need to do it in public so people can see it and remember that it could be them.
The main problem with execution is, there isn’t enough of it, there are too many levels of appeal, it takes too long to carry out.