Should I stay or should I go? For many homeowners, that's the question.

Conventional wisdom strongly dictates that homeowners should live in their place for at least five years if they want to walk away with a legit return on their investment—or sometimes the shirts on their backs. But in an era when even "honesty is the best policy" is up for debate, aphorisms aren't what they used to be. In some parts of the U.S., homeowners seem afflicted with wanderlust—pulling up roots, moving early and often. But in others, they're more apt to stay in their cherished homes for decades.

The realtor.com® data team identified the housing markets where folks are holding onto their residences the longest—and where they're putting their properties back on the market in record time.

Generally, for the past decade or so, more homeowners have been staying in their residences longer, according to the National Association of Realtors®. They went from living at the same address for a median six years in 2008 to a median 10 beginning in 2014. That's partly because so many folks found themselves unexpectedly underwater on their mortgages when the housing bubble burst. (This figure includes only primary residences whereas our analysis includes home flips, rental properties, and vacation homes, which tend to be held for fewer years.)

"I'm seeing people bottled up in their homes because they have nowhere to move to," says Dowell Myers, an urban planning and demography professor at the University of Southern California, in Los Angeles. "We have burgeoning demand and an insufficient supply of homes for sale, which creates gridlock."

On the flip side, "higher rates of construction will stimulate more turnover" in many markets as there are more homes to choose from, he continues. Some of "the markets where people had been underwater following the Great Recession, now have equity for the first time. You may have a surge in sellers as people try to act on their long-delayed plans to move on."

In some markets, lots of churn is good for both buyers and sellers. It means there are more properties for would-be homeowners to choose from. And in the best-case scenario, home appreciation is so strong that sellers can walk away early—and still make a profit.

To find where owners are staying put for the longest and shortest periods of time, we looked at homes that sold over the past 12 months in the 100 largest metros. (Metros include the main city and the suburbs surrounding it.) We compared those sales with their previous ones going back as far as 2000, enabling us to calculate the average number of months that homes were owned between sales. We included only one metro per state to ensure geographic diversity.

Now let's go the places where homeowners are holding on tight.

Average time between sales: 99 months

Median home list price: $170,000

Located along the U.S.-Mexico border, El Paso has an abundance of Texas charm and great eats. But many residents of this border town, where most of the employment comes from government jobs and the oil and gas industry, are struggling. The median household income here is just $43,222—33.3% less than national levels..

"Lower wages mean homeowners are less likely to sell and try to trade up," says Tom Torres, a real estate agent at Clear View Realty in El Paso. The folks who do sell are often nearing retirement and looking to downsize, he says.

El Paso might not have lots of deep-pocketed homebuyers or megamansions, but the three-bedroom, two-bath homes on the market here are usually within buyers’ budget. In fact, realtor.com named El Paso one of America's middle-class meccas earlier this year, with 69% of the homes here being within reach of middle-income buyers.

Average time between sales: 98 months

Median home list price: $259,500

The largest city in New Mexico, Albuquerque is packed with the pueblo homes so common throughout the Southwest. These two-story abodes have flat roofs and walls that are good for staying cool during the region's hot summer. Residents here don't seem to have an overwhelming desire to trade up to McMansions.

“There's a strong cultural bent to stay to put,” says Ben Levine, an associate broker at Re/Max Select in Albuquerque. He contends that Albuquerque is a decidedly down-to-earth, family-oriented community. "People here are not so driven to own luxury cars and designer clothes.”

Albuquerque has a mix of lifelong residents and retirees who moved here because of the mild winters, dry heat, and affordable home prices. While homes here aren't as cheap as those in El Paso, they're still well under the $299,000 national median price.

Just because folks like to stay where they are doesn't mean there aren't properties for sale. Homes sell the fastest near downtown, in areas such as Nob Hill, a historic neighborhood with nightlife, shopping, and restaurants. This two-bedroom, pueblo-style home built in 1951 in Nob Hill is on the market for $149,000.

Average time between sales: 97 months

Median home list price: $700,000

On one side of Oxnard, which sits along the Pacific Ocean on the coast, is Los Angeles, where the median home cost is a whopping $762,600. But the other side is even more unaffordable, with median prices in Santa Barbara hitting a nosebleed-inducing $1.4 million. That may be why folks hoping to save a few bucks by living in Oxnard aren't looking to go anywhere.

"A million-dollar home [in Santa Barbara] costs $500,000 in Oxnard," says Julia Otero, a local real estate agent at Berkshire Hathaway HomeServices California Properties. "It's its little own world, and you don't have to get out of Oxnard for beaches, shopping, or a night out."

Most of the sellers Otero works with have been in their homes for about a decade and are moving to retire outside of the city. Meanwhile, most of her buyers are purchasing their first homes, which they hope to live in for years to come.

Average time between sales: 97 months

Median home list price: $215,100

Many Greensboro residents may dream of moving into a new home—but fast-rising prices and a lack of homes on the market are keeping many of them right where they are. Median list prices are up 11.1% in the past year alone. That's not an easy increase to stomach for those looking to trade up or down.

“If there’s not a reason to move, what are you going to get in this frenzy?" asks local real estate agent D.J. McGarrigan of Allen Tate Realtors. "A lot of people are doing renovations to their house ... because it’s so hard to replace what you’ve got.”

Those who are selling—particularly anything under $400,000 in a good school district—are in for a windfall. Just recently, he showed a four-bedroom home in a nice area 40 times and received eight offers. It's now selling for well over its $220,000 list price.

But then what? "In order to replace what you have, you're going to have a hard time finding something new," McGarrigan warns.

Average time between sales: 96 months

Median home list price: $270,000

The City of Brotherly Love is filled with neighborhoods where folks know everyone and wouldn't dream of leaving their community behind. Many of these areas are packed with brick,100-year-old row homes often passed down from generation to generation.

“There aren't lots of people moving from neighborhood to neighborhood,” says Liz Lutz, a real estate agent at Re/Max One Realty in Philadelphia. They're "so tied into their community they can't imagine being anywhere else."

Another reason more folks are staying put is some of the schools in the city have been improving. That puts less pressure on families to move into the suburbs.

The rest of the top 10 metros where homeowners are staying the longest are Cleveland (95 months), at sixth, followed by Seattle (94 months); Baltimore (93 months); Rochester, NY (93 months); and Jacksonville, FL (92 months).

Got it? Now let's look at U.S. cities with the most peripatetic homeowners.

Average time between sales: 33 months

Median home list price: $350,000

The reason for the constant churn in Providence is simple: It's filled with here-today-gone-tomorrow college students—and the teaching professionals who mold 'em. The state capital is home to Brown University, Rhode Island School of Design, and Johnson & Wales University among others. The savviest of students, recent grads, and their families are buying homes for a few years and then putting them on the market for a quick profit.

“We have a lot of transient professors from Brown and Johnson & Wales that will only stay for a year or two,” says Joshua Deaner, real estate broker and owner of the Rhode Guide Real Estate Co. in Providence. “I’ve seen one house that has sold three times in 10 years. It’s not haunted or anything—it’s just that academics tend to like similar things. The houses go from one professor to another."

Single-family homes priced under $350,000 sell fast. And homes on the east side of town, where they tend to be nicer and larger, are even more in-demand, Deaner says.

But the short buy-sell time frame isn't stopping local homeowners from walking away with some serious money. In fact, earlier this month the realtor.com data team found that home sellers in the past year in Providence made a roughly 11% return on their initial investment.

Average time between sales: 35 months

Median home list price: $299,800

Located two hours south of Tampa Bay along the Florida Gulf Coast, Cape Coral is a hotbed for retirees, snowbirds, and vacationers. And they're constantly on the move.

“We are a vacation community with lots of second homes,” says Mike Lombardo, a broker in Cape Coral. A standard second home here is this three-bedroom, two-bath ranch in a private cul-de-sac for $209,900. "People don’t hold those as long as primary residences."

Like many other parts of Florida, Cape Coral was hit hard by the housing crash, with a deluge of foreclosures and plummeting home prices. Those who bought when the market was low, around 2011 and 2012, are realizing they now have quite a bit of equity in their abodes. And many are choosing to cash out.

Average time between sales: 36 months

Median home list price: $200,000

Government officials and business leaders in Greenville have worked hard to sell the region as a go-to spot for young families. With low taxes, a business-friendly environment, and a charming downtown with a damn fine whiskey distillery and boutiques oozing Southern charm, Ameco, Michelin, and General Electric all have established a big presence there.

Those improvements and good salaries have brought lots of new residents into the area. (The population of just Greenville County swelled 12.3% from April 1, 2010, to July 1, 2017, according to the U.S. Census Bureau.) Some stay for a few years before moving to other cities in the South, such as Atlanta. Others simply keep trading up as they earn more money.

“They are here for three or four years. But to move up the ladder, they take a new job or assignment in a different city,” says Melissa Morrell, a local real estate agent at Berkshire Hathaway HomeServices.

Average time between sales: 44 months

Median home list price: $286,100

Moving to NOLA may make your friends jealous, particularly come Mardi Gras. The region is constantly attracting new residents, particularly younger folks who dream of debauched strolls down Bourbon Street.

“Most folks move here simply for a lifestyle change,” says Michelle LaBanca, a real estate agent at French Quarter Realty. “They’ll stay for a few years hoping to get the New Orleans experience and then move on to something new.”

(The metro is also a college town, home to Tulane University, Loyola University, and Xavier University of Louisiana, among others, which contributes to the churn.)

First-time buyers often pick up duplexes in parts of New Orleans like Mid-City, a hip neighborhood filled with restaurants and bars, where they run about $300,000, LaBanca says. They own these homes for a few years and then upgrade into something bigger.

“Some neighborhoods have lower inventory but a really high demand," LaBanca says. "So people will buy and sell two or three years later just to make a profit."

Average time between sales: 47 months

Median home list price: $310,000

Madison is another big college town, centered on the University of Wisconsin-Madison and its 44,000 students.

“Parents will buy two units and income properties for their kids to live in while they’re at UW,” says Sara Alvarado, owner of Alvarado Real Estate Group. "After their kids graduate, they'll either sell the units or rent them out."

In addition, she sees many folks who come to the area for work only to be relocated by their employers a few years later. “That can happen quickly, and they’re forced to sell," Alvarado says.

Single-family homes in the suburbs are the hottest segment of the market. This three-bedroom home with granite countertops and a big backyard in nearby Waunakee is going for $324,900. And because they're so in-demand, many of these abodes can fetch as many as 15 offers, Alvarado says.

The rest of the top 10 metros where homeowners stay the least amount of time are Grand Rapids, MI (51 months), at sixth, followed by Knoxville, TN (54 months); Boston (57 months); Omaha, NE (66 months); and Augusta, GA (66 months.

Sources: realtor.com and Corelogic

Allison Underhill and Clare Trapasso contributed to this report.