I'm not fundamentally opposed to it, but in the case of my kids...it just wasn't very effective. The amount of pain required to actually effect behavioral change is beyond where I was willing to go. I tried more spanking with my oldest, but found it kind of disturbing fairly early.
What did work however, was the THREAT of violence. We did have a wooden spoon handy to brandish in times of need, and that did get real compliance, even though we never really used it. We did take a couple "swing and a miss", but that's about it. But we grabbed it pretty frequently.
But also, public shaming. The most effective for our kids was public shaming...far more than any corporal punishment I could inflict.
In my opinion and experience, it's a losing proposition long term. I would only use it for kids who do dangerous life threatening things, like grabbing a pot of water off the stove, or running into the street, or running away from parents in a crowd, AND are too young to understand other forms of punishment.
If your 3 year old is running into the street, I think there are times when you might have to give them a real spanking, with real pain, to make that connection. To me, that's the kind of thing you might do once or twice at most, or maybe never, in their childhood.