It depends on how much of a connection i have with my partner.
it depends on the relationship and the people involved but it can take a long time. although i hated my violent ex-husband for the pain he caused me in our relationship it took a good 2 - 3 years before i was ready to give my heart again. i've only just split with my current partner of 5 years 3 days ago and i loved her more than life itself at times... i don't know when my heart will heal this time, i'm really broken.
It varied from a couple of weeks to maybe 2 years. I don't think I'm completely over my last bf (the one 2yrs ago), though we hardly had a relationship...I had alot of hope for us and really thought he could be the one.
It took me 4 months to get over my last relationship I had... Now I don't even want to talk to him, but he won't leave me alone ):
Before I was married when I would have different relationships, it always varied how long it took. In one case I was over them to start with, in one case it took a day, a week, in one case of the one I loved most(and we never even dated or were in a relationship, I just loved him to an unbelievable degree), it took 5 years(that is the longest). Most of the time it did not take very long however, only that one time. When I was younger(before the 5 year one) it took about a year though to get over someone.
Now that I am married I hope I never have to get over him. If I ever had to, I would either never get over him the rest of my life, or it could take 10 or more years, that is my guess.