There is a big difference between a spanking and a beating. And I agree that spankings are for little children. Older ones get limits, and it works if they know that you mean it and stick to it.
Spankings should be orchestrated for effect.
The parent should never do this while angry. My favorite method was to schedule it like a execution. Set the time and place. Make the kid consider the the error of his ways for several hours.
Sometimes, they can be pretty convincing when asking for a pardon. If they are, I would often put them on probation. It worked well in most cases.
As to age, I don't recall using it much after age 9 or ten. (boys)
The girls usually learn how to avoid such things much earlier.(around 6 or seven)
I raised three, and probably actually delivered three or four actual spankings. (can't really recall..........gettin to old I suppose)