Preventing uti's?

Should I pee before and after sex or just after to help prevent uti's?