Breast compression during mammography can cause discomfort. Doctors may prescribe painkillers approximately 45 minutes to 1 hour before the test to reduce pain. Doctors advise patients to schedule the test a week after the end of their menstrual periods since breasts are less tender at that time and hurt less.