HSG test compared to child birth

I had a HSG exam a couple of months back and it was terrible for me, I think the worst pain I've ever been in like I was stabbed and someone was turning the knife. Now I'm thinking.... how would it compare to child birth!?! Has anyone experienced both? I know it's hard to compare the pain from child birth and I know people have a different level of pain from the HSG...but is birth a million times worse or is it closer in pain than anything else?