The occurrence of Mycoplasma hyopneumoniae infections in young pigs was surveyed in a retrospective study of 1122 datasets obtained from routine diagnostics where either suckling or nursery pigs were examined for M hyopneumoniae in lung tissue. Findings were correlated with the presence of lung lesions, detection of other respiratory pathogens, vaccination history and parameters describing the herd of origin. The prevalence of M hyopneumoniae in lung tissue from 201 suckling pigs was 2.0 per cent and, therefore, significantly lower than in lung tissue from 921 nursery pigs, which was 9.3 per cent. Previous use of antimicrobials and the vital status of the pigs when delivered for postmortem examination did not influence the detection of M hyopneumoniae infection. The presence of the porcine reproductive and respiratory syndrome virus (PRRSV)-EU genotype, Pasteurella multocida, Haemophilus parasuis, Mycoplasma hyorhinis or Streptococcus suis was correlated with a higher probability of also finding M hyopneumoniae. The history of vaccination, the time of the first or second application, and the type of vaccine (one- versus two-shot) did not influence the detection of M hyopneumoniae. A correlation between the type of herd and the presence of M hyopneumoniae was statistically insignificant and no effect of farrowing rhythm could be confirmed.