Dear Doctor:

A lot of my friends are talking about pickles these days because they’re a way to get probiotics into your diet. But I read that pickled foods are associated with higher rates of cancer. Are pickles good or bad for you? I’m confused.

Dear Reader: While it’s true that researchers have identified the consumption of pickled vegetables as a potential risk factor in certain gastric cancers, it doesn’t necessarily mean you have to ditch those delicious dill spears that came with your sandwich. In the big picture, the data suggest a link between pickles and some cancers, but when you drill down into the details, it turns out that additional factors appear to be at play.

Let’s start with pickles themselves. Virtually every culture in the world has a tradition of pickling. Methods vary, but most use some combination of salt, liquid and sometimes oil to induce and support fermentation, which preserves food for use beyond its growing season.

In the United States, cucumbers and cabbage account for the majority of pickled vegetables. At just 4 pounds per person per year, they’re treated as a condiment. However, in many other parts of the world, including China, Japan, Korea and Turkey, a wide range of fermented vegetables (as well as fruit, soy products and sometimes meat) are a dietary mainstay, eaten daily for nine to 12 months of the year.

The idea of a pickle-cancer link arose when scientists began to look at cancer registries established in China in the 1960s. As researchers crunched the numbers, they found a high rate of gastric cancer in regions where pickled foods were eaten daily throughout the year. Since then, though, other groups of researchers have analyzed a wide range of these studies. They found that differing methodologies, as well additional lifestyle factors, made the direct link between pickles and cancer more tenuous.

In some cases, the populations being studied also ate high-fat diets and a lot of barbecued meat, both of which have a link to increased cancer risk. In other study groups, smoking was widespread and thus also implicated in potential disease. And, finally, there were the pickles themselves.

For example, a traditional way of pickling vegetables in parts of China involves packing them in salted water, sometimes seawater, for a period of weeks or months. During this time, fermentation occurs. However, the process also produces yeasts and fungi, some of which have the potential to produce compounds that are carcinogenic. A combination of the pickling method and the volume of vegetables consumed could be a factor in the higher gastric cancer rates.

In the U.S., by contrast, most commercially produced pickles are made without fermentation, in a process that uses vinegar and pasteurization. Although this eliminates the risk posed by those carcinogenic compounds, it also means these pickles won’t be a source of probiotics. In addition, pickles are high in sodium, with a single dill pickle packing a hefty 50 percent of a day’s supply of sodium.

Bottom line, with what we know now: Whether it’s fermented or commercial pickles that you’re eating, moderation is the key.