The influence of a coaxial dielectric rod on eigenvalues, ohmic losses, transverse field structure and beam-wave coupling coefficients is investigated for TE modes of a gyrotron cavity. It is shown that such dielectric insert, when made from a moderate-loss material, results in strong attenuation of all cavity modes, with the exception of those having caustic radii much larger than the insert radius. It is proposed to employ such dielectric loading for selective suppression of competing modes in cavities of second-harmonic gyrotrons. The high performance and flexibility of the proposed method of mode discrimination is demonstrated for the example of the cavity of the high-power 0.39-GHz second-harmonic gyrotron developed at the University of Fukui. In addition, some fascinating capabilities enabled by coaxial inserts made of ultralow-loss dielectrics are discussed.