Recurring uti or too much sex?

I started having utis when I was little, but they became a huge problem once I became sexually active. With my last boyfriend I was at the doctor so often that she gave me an antibiotic prescription and told me to take it on demand, pretty much before or after sex or if I had symptoms. My current boyfriend and I have sex almost every day and sometimes more. I obviously can't be taking antibiotics that frequently, and even though I try to pee after sex it seems inevitable that I get a uti once every couple of weeks at the least. They're so uncomfortable that it disrupts my entire day and I've been up all night or missed work and classes because of them. How can I prevent them or at least put them off. Is it possible I'm just irritated from sex and need better lube?