"The philosopher Daniel Dennett has pondered a revealing scenario: Someone is undergoing surgery without anesthesia but with absolute knowledge that afterward, she would receive a drug that would erase all memories of the event. Would the pain be less agonizing if she knew that it would be forgotten?"
I've only been under anesthesia once, when I had my wisdom teeth out. A few days beforehand I was struck with this same thought - what if they anesthetics simply paralysed you, rendering you unable to respond to pain, while temporarily interfering with your ability to form new memories? What if all the pain was experienced in full, and you were simply unable to remember it afterwards? How could anyone know the difference? This made the few days prior to surgery very uncomfortable.