From two paces anyone with a knife in their hand and the determination to use it will generally manage to stab anyone with a handgun unless you hit them with a headshot or sever the spine. In a confined space there's not much difference in effectiveness.
Most decent knives will also go through kevlar body armor.
That tends to be the case in the UK