Usually a month or a few weeks. Just tell your partner to take the sex easy, because your vagina is not quite ready yet for "hard-core" sex. Keep on having sex, taking it easy, on a regular basis, and eventually your body will become used to it and the swelling and pain will go away. If it is infected, go see a doctor. If it is hurting to much at the moment, just have "playtime" and have oral sex to keep your partner happy and wait a while before having intercourse again.