Buying and selling your home, or any other real estate, is more expensive than most people think. The cost of selling your home run well past the five or six per cent commission to your broker. Add in repairs to get the house up to market standards, carrying costs, title insurance, staging, and recording fees and you end up with about ten per cent of the sale, actually. And don't forget that this percentage goes up for cheaper homes, because some of these costs are not proportional.
Although that means that the optimal time period to hold real estate is forever, that may or may not fit into your plans. In fact, most people change where they live every seven years or so. And nobody is saying that you should continue to live somewhere you don't want to just because of the deed recording fees. However, it is important to take the real impact of those costs into account before deciding if you can afford to move.
Don't forget to budget for a transitional time where you will have moved but still waiting on your old house to sell. That will mean a bridge loan (fees and monthly interest) for your new home and an extra mortgage payment for your old one. Depending on where the house is, what condition it is, and how expensive, selling your old home could take months.