We determine the conical half-angle at which a weak, loosely focused Bessel–Gauss beam of fixed focal intensity and confocal parameter is most efficient at generating a given harmonic in a gaseous target of arbitrary density profile. Simple analytical results are compared with fully numerical calculations for hydrogen, xenon, and rubidium. The variation of the conversion efficiency with the conical half-angle is shown to depend on the properties of the medium only through the macroscopic dispersion.