Taking a cool, refreshing dip in a lake or swimming pool is one of summer’s enjoyments and sometimes a necessary escape from the stifling heat.

But two recent federal health studies found that some waters is better than others, at least when it comes to avoiding waterborne illnesses.

Of 633 outbreaks nationwide caused by bacteria, viruses or other things floating around, nearly 80 percent of them were traced to water that was treated with chlorine or other chemicals in swimming pools, hot tubs or wading pools. Most illnesses cause intestinal problems and diarrhea.

The studies, which tracked outbreaks from 2000 through 2014, found 493 outbreaks where 27,219 people were sickened and eight died from pathogens in recreational water treated with chemicals. The figures do not include sicknesses linked to private pools or cases where just one person got ill.

By comparison, there were just 140 outbreaks linked to lakes, rivers or swimming holes, with 4,958 people falling ill and two deaths, according to the Centers for Disease Control and Prevention.

“People have a false sense of security when they go to a swimming pool,” said Trisha Robinson, an epidemiologist supervisor at the Minnesota Department of Health. “There is this sense that chlorine kills everything. That is not the case.”

In Minnesota, there were 51 reported recreational-water disease outbreaks over the past 10 years. Only nine were from pathogens in lakes or rivers. Still, compared with foodborne disease outbreaks, which recently have been linked to tainted lettuce, pre-cut melon, raw veggie plates, cereal, eggs and restaurant workers who don’t wash their hands, the risk of getting a waterborne illness is relatively low.

In Minnesota, public pools must be licensed and often are inspected annually. Regulators check on safety equipment, plumbing and chemical levels.

“If they are not meeting the chlorine level, we would do a closure on that until they meet the requirement,” said Ryan Krick, an environment health supervisor at the Minneapolis Department of Health.

Pool operators are also required to check chemical levels daily and keep a log of chemicals added.

But add people to the pools, and that is where the problems begin.

“It really is a communal bathtub,” said Robinson. “You are sharing water and germs in it with everybody else that is in there.”

The chlorine and other chemicals help neutralize some things, but many outbreaks have been caused by Cryptosporidium, a tiny parasite that can survive in chlorinated water up to seven days.

The source of the problem is human fecal matter. While an accident made by an infant is the nightmare scenario, even the most fastidious adults can be the source if they do not shower before entering the pool.

“We can make a lot of people sick if we don’t take precautions,” said Robinson.

No one who has not showered should swim in a lake either, but the sheer size of most lakes means the bacteria and microscopic parasites disperse, lessening the chances of infection even if someone swallows water accidentally.

Most of the waterborne diseases lead to stomach and intestinal symptoms, including diarrhea, stomach cramps, fever and vomiting.

Tragically, Minnesota has seen two fatalities in children caused from a waterborne amoeba that enters the nose and attacks the brain. Although rare, it is most risky in shallow, warm lakewater. Parents should teach children to try to keep water out of their noses or mouths, Robinson said.

Also, people should avoid swimming in areas that are contaminated with animal feces. Some local and state health departments monitor beaches for contamination.

“Swimming is a really great activity,” said Robinson. “No matter where [you are] swimming, try not to swallow the water.”