A very good question, and I guess it depends on how you wish to interpret the facts.
In the United States, 23 people were executed (21 by lethal injection, two electrocution), through mid-August, 2018 according to a CNN report. A total of 39 death sentences were mandated, and through July 1, 2017, 2,817 people were on death row throughout the various prisons in the U.S. Also as of August, 2018, 31 states had the death penalty in one form or another.
In my mind, that's not a lot of people who are being executed, or awaiting execution in comparison to certainly all crime, but even to that which generally rises to the level of a death penalty conviction—murder and a few other crimes, such as treason—those numbers seem pretty low.
So, if few people are actually being convicted, let alone executed, and yet crimes that could draw a death penalty sentence are constant or up, I would say, no, the death penalty has not been an effective deterrent. According to at least one source I read, the south, where the bulk of the death penalty convictions are actually carried out, murder and other crimes have not gone down.
Regardless, I believe there are factors at work here which should be considered:
What does it take to get the death sentence? Some states are relatively lenient, so the same violent crime could be multiple life sentences with various options for parole in one state, while garner the death penalty in another.
How quickly are the sentences carried out? In nearly all cases, there are legal battles that take place well after the convictions. Some end up in stays of execution (for one reason or another, including a person actually being innocent), while others go on indefinitely. In other words, those convicted of the death penalty are rarely, if ever, executed quickly.
What type of individual is committing crimes that will receive the death penalty? Typically it's the hardened criminal, one who has been in prison for an assortment of different crimes that become more violent over time. They are folks who, for one reason or another, effectively place little value on human life. It could be mental illness, it could be irrational decision making, it could be pure evil. These kinds of folks aren't likely to be deterred by anything.
Based on the answers to these questions, and probably more, we might get to the effectiveness of the death penalty as a deterrent, if properly implemented, from the sentencing to the time in which it takes to be carried out. As it is, it doesn't appear to be enough of a deterrent, certainly not as much as it could be. The likelihood of the changes being made to make it so, however, are slim to none.