Context. Stellar noise produced by oscillations, granulation phenomena (granulation, mesogranulation, and supergranulation), and activity affects radial velocity measurements. The signature of the corresponding effect in radial velocity is small, around the meterper-second, but already too large for the detection of Earth-mass planets in habitable zones. Aims. We address the important role played by observational strategies in averaging out the radial velocity signature of stellar noise. We also derive the planetary mass detection limits expected in the presence of stellar noise. Methods. We start with HARPS asteroseismology measurements for four stars (β Hyi, α Cen A, μ Ara, and τ Ceti) available in the ESO archive and very precise measurements of α Cen B. This sample covers different spectral types from G2 to K1 and different evolutionary stages, from subgiant to dwarf stars. Since data span between 5 and 8 days, only stellar noise sources with timescales shorter than this time span will be extracted from these observations. Therefore, we are able to study oscillation modes and granulation phenomena without being significantly affected by activity noise present on longer timescales. For those five stars, we generate synthetic radial velocity measurements after fitting the corresponding models of stellar noise in Fourier space. These measurements allow us to study the radial velocity variation due to stellar noise for different observational strategies as well as the corresponding planetary mass detection limits. Results. Applying three measurements per night of 10 min exposure each, 2 h apart, seems to most efficiently average out the stellar noise considered. For quiet K1V stars such as α Cen B, this strategy allows us to detect planets of about three times the mass of Earth with an orbital period of 200 days, corresponding to the habitable zone of the star. Moreover, our simulations suggest that planets smaller than typically 5 M ⊕ can be detected with HARPS over a wide range of separations around most non-active solar-type dwarfs. Since activity is not yet included in our simulation, these detection limits correspond to a case, which exists, where the host star has few magnetic features and stellar noise is dominated by oscillation modes and granulation phenomena. For our star sample, a trend between spectral type and surface gravity and the level of radial velocity variation is also identified by our simulations.