By the time I graduated high school, I'd lived in five different communities, the longest stay being 5.5 years. One doesn't exactly learn patience or how to take deep root with that kind of life. In fact, my current 3.5-year stay where I am is a pretty average length of time. So if I was to pattern my ministry after what I've experienced, I'm probably about due to start searching for my next gig, give or take another year.
The fortunate side to this is that in contrast to my father's life as a full-time pastor, my own ministry thus far does not feature congregational backbiting, betrayal by friends, anonymous threats, and the demand to put church ahead of family. My church is wonderful for doing none of those things, so I currently have a very good chance of getting to 7.5 or longer, rather than scraping and clawing to 5.5 and moving on.
Besides that, if I actually packed myself up every five years, do you know how many churches I'd serve at the end of a 40-year career? Too damn many, that's how many. In other professions, you can change jobs while staying within the same company and even the same building and thus don't necessarily need to move to a new community each time. Mainline pastors can't do that. They typically need to find out where the open churches of their denomination are, and go there. Doing this would bring way too many transitions for my family, way too many school districts for my son, and way too many "fresh starts" for me as a pastor. And never enough time to do much of anything in any one church. Good ministry is partially about longevity, and so is a healthy home situation as far as I'm concerned.
Will I be in my current church forever? Probably not, if I'm honest. However, the timing of leaving and the amount of time that I've spent here will partially determine how successful or worthwhile our work has been together. I don't necessarily need to set some sort of goal for how long to stay. But I think it's a worthwhile goal for every pastor to pursue more years at fewer churches over the span of a career, unless you're an intentional interim or are single with no kids. For these two groups, it is either the nature of your call or simply easier to uproot yourself.