How painful would burning at the stake be?

Say you were accused of witchcraft and burnt at the stake for it. Just how bad would this method of death be. How long would it take before you fell unconscious and died? Would getting your nerves burnt off be a late saving salvation before death?
How painful would burning at the stake be?
Post Opinion