It will be proved that when S is a commutative algebra of finite type over a commutative noetherian ring K, and d is the Krull dimension of S, then the vanishing of (d + 2) consecutive Hochshild cohomology groups of the K-algebra S implies that S is smooth over K. In particular, when K is a field and S has finite rank over K, the vanishing of two consecutive groups implies that S is a direct product of separable field extensions. This is complemented by a recent example of Buchweitz, Green, Madsen, and Solberg, of a non-commutative algebra of rank 4 over a field, which has finitely many non-vanishing Hochshild cohomology groups snd inginite global dimension. Together, these results show that Lensing's conjecture that eventual vanishing of Hochschild cohomology implies finite global dimension holds for commutative algebras, but fails in general.