How long do the side effects of sertraline usually last?

Depends. Some s/e like loose stool are just temporaru for the 1st week or so as your body adapts. Others, like sexual dysfunction (if it should occur) can be pretty persistent. The important thing to keep in mind is that no 2 people are the same.