As for biblical guidance on the subject, there does not seem to be anything very much in the New Testament. This is in part because the New Testament is very much a book about beginnings and covers only a relatively short period in history. James the Lord's brother in Jerusalem seems the one example of a settled pastorate over many years. Tradition speaks very highly of his impact in that city and it comes out in Scripture. Perhaps there is something in the very title pastor or shepherd that suggests a long term commitment to the sheep. Even a teacher has to make some sort of time commitment if he is going to be effective. Elder again conjures up someone committed for the long haul until death intervenes.
When we turn to the Old Testament we have examples of long periods of leadership in the case of some of the kings and long periods of ministry in the case of some of the priests and prophets. The very fact that Isaiah, Jeremiah and Daniel had lengthy ministries in one place surely demonstrates that on the face of it there is nothing to be said against a man continuing long in a ministry in one place. John Wesley and others so structured the Methodist connexion that no-one stayed very long anywhere. One can see the wisdom in that, given the time and situation, but whether he was wise to do that in every case is hugely open to question and it can be argued that this is one of the things that has served to undermine Methodism in a way that is not true of the Baptist cause.
Saul, David and Solomon all reigned for lengthy periods (around 40 years). When we think of the kings of Judah we notice that only eight of the 20 or more reigned 25 years or more. The statistics:
Asa 41 years; Jehoshaphat 25 years; Joash 40 years; Amaziah 29 years;
Uzziah (Azariah), 52 years; Hezekiah, 29 years; Manasseh, 55 years; Josiah 31 years.
If you know your kings you will immediately notice that, apart from Manasseh (the exception that proves the rule perhaps), these were all kings who were pronounced good. In the case of Joash, you remember, however, that he only did what was right in the eyes of the LORD all the years of Jehoiada the priest (1 Chronicles 24:2). The last 11 years of Uzziah's reign were clouded by his proud act of entering the temple to offer incense punished by leprosy and even the final years of Hezekiah were not exactly without their problems. These are important further caveats.
So we may say, in general, that kings who served a long time were good kings – men such as David, Solomon, Jehoshaphat, Hezekiah and Josiah and that men who were kings for a short time – such as Abijah (3 years), Ahaziah (1 year), Amon (2 years), Jehoahaz and Jehoachin (3 months each) were bad kings. However, we must not never forget Manasseh, a very bad king who only repented at the very end and Saul who started well enough but soon turned bad. We have also mentioned Joash, Uzziah and Hezekiah and the negatives that have to be added with regard to their reigns. Solomon is another long reigning king whose record was not without blemish.