We're light-years away from the closest stars, but in the billions of years of history in the Milky Way, our Sun has come much closer to other stars. For example, a star passes within 0.8 light-years every millions years and 0.16 light-years every 20 million years. These close passes have had a collective effect on the planets, shifting their orbits and helping to explain some of the eccentricities of the planets. Some of these might even have affected Earth's climate.