Sometimes it’s OK to be more focused on making money than making friends.

Alex Yong, 46, became an equity research coordinator working for the top two bosses at his Wall Street firm in 2006 because he kept his head down and avoided what he calls “unnecessary drama” by skipping most company happy hours.

“There was a lot of Machiavellian fakeness going on, because people were trying to treat each other as chess pieces, and I didn’t have time to play those games,” Yong, now a journalist and freelance consultant, told Moneyish. “I’m all business. I have my friends outside of work.”

Jill, a Ph.D. candidate who teaches as part of her doctoral program, also told Moneyish that she keeps colleagues at an arm’s length.

“I’m very cordial, and I make small talk when it’s appropriate, but I just want to avoid any drama or problems that could arise from mixing personal relationships with professional ones,” the 28-year-old said. “I’ve seen my colleagues get wrapped up in interpersonal  drama, and then that angst and frustration comes out during meetings, and that makes everyone uncomfortable and unproductive. We have work to do.”

See also: Do not friend these kinds of coworkers on Facebook

Workplaces are getting more businesslike. In 1985, half of Americans said they had a close friend at work, but that dropped to 30% by 2004.

That’s partly because people are job-hopping more today – particularly in the media, entertainment, government, education, professional services and nonprofit industries. LinkedIn reports that the number of companies people worked for in the five years after graduating has nearly doubled over the past 20 years. So there’s less incentive to invest in making friends on the job if you’re just going to transfer in a year or two.

Even Kim Cattrall – whose onscreen friendship with Sarah Jessica Parker, Cynthia Nixon and Kristin Davis on “Sex and the City” for more than a decade epitomized early #squadgoals – recently revealed to Piers Morgan that she wasn’t BFFs with the girls in real life. They haven’t even kept in touch since the 2010 movie sequel wrapped.

“We’ve never been friends. We‘ve been colleagues and in some ways it’s a very healthy place to be,” she said, “because then you have a clear line between your professional life and relationship and your personal.”

And career experts say that’s OK.

“You need to get along with others, communicate effectively, and demonstrate sincerity and accountability. But you don’t need to learn a colleague’s life story or hear in detail about their latest romantic rendezvous,” Dr. Amy Cooper Hakim, a psychology practitioner and co-author of “Working With Difficult People,” told Moneyish. “In fact, we are often more productive when we compartmentalize work time and personal time.”

Yes, we spend an average of 47 hours a week at work, so most of us see our colleagues more than our families. And people with friends at work report receiving more praise and recognition for the accomplishments, according to Gallup research. A new Ohio State University study has also found that workplace teams composed of friends perform better on some tasks than groups of strangers or acquaintances.

But it can get very complicated very fast. Research also shows that while people who are friends with coworkers say they’re happier, they also report feeling more distracted and emotionally exhausted by keeping up these office relationships. And since friends tend to think alike and want to support each other, teams staffed with buds are not as innovative as those with weak social ties, who tend to bring different points of view to the table.

Dr. Hakim noted that getting personal with peers complicates things. You may feel more slighted if they’re not riveted by your latest cat photo, or feel more resentful if they get promoted or put on a project over you, than you would if you were just friendly acquaintances.

Or you might hesitate to call out a colleague who’s not responding to important emails or meeting deadlines because you don’t want to hurt the friendship.

“When we take some of the emotional component out of our interactions, we are able to focus more on the tasks at hand, and make better use of our time getting work done, doing it well, and appearing professional so that our boss knows that he or she can count on us,” said Dr. Hakim.

See also: 9 ways to make working with your friends the best 

And certain positions, particularly leadership roles, call for being more aloof. While Emily Marquis, 34, was working her way up the ranks at her last job’s human resources department, she had a professional obligation to stay detached from her coworkers – who would try to pry personal information about other employees out of her at social events.

“There are people who enjoy drama, and they would just start probing,” she told Moneyish, “Like, ‘This person is driving me crazy because they don’t do their work – what does the boss think about it?’ Or, if someone was on medical leave, people were dying to know what was wrong with them.”

So she hung out with her husband or friends she knew outside the office, instead. “It worked out for me,” said Marquis, who got promoted to director of human resources by age 28. She’s since left to run her own career counseling service. “The employees knew they could confide in me, and the leaders knew they could trust me with information about business dealings, like if they were going to acquire another company or lay people off.”

You can be cordial without being cold, however. You should still greet coworkers in the morning and say goodbye to them in the evening, and it’s natural to ask how their vacation was, or what they thought of last night’s “Game of Thrones” episode.

Just bring it back to business when things get more personal than you are comfortable discussing, or if the quick chat starts running into a long conversation. “I’ll say something like, ‘I’m sure you’re as busy as I am, so let’s get our work done, and maybe we can chat more a little later,'” suggested Jill, who added, “And that chat typically doesn’t happen.”