  Let $R$ be any ring. We prove that all direct products of flat right
$R$-modules have finite flat dimension if and only if each finitely generated
left ideal of $R$ has finite projective dimension relative to the class of all
$\mathcal F$-Mittag-Leffler left $R$-modules, where $\mathcal F$ is the class
of all flat right $R$-modules. In order to prove this theorem, we obtain a
general result concerning global relative dimension. Namely, if $\mathcal X$ is
any class of left $R$-modules closed under filtrations that contains all
projective modules, then $R$ has finite left global projective dimension
relative to $\mathcal X$ if and only if each left ideal of $R$ has finite
projective dimension relative to $\mathcal X$. This result contains, as
particular cases, the well known results concerning the classical left global,
weak and Gorenstein global dimensions.
