Hsg X-ray test

Has anyone ever had a hsg done? I have heard mixed reviews about it being painful