It is meant to be a bit painful in all circumstances. It isn't a pleasant way to die, but it doesn't look all that bad to watch, which is why it is used. Pain and trauma free measures like nitrogen asphyxiation aren't used for that reason; pro-death penalty advocates want to keep it painful.