Let $M$ be a module over a ring $R$. In nice situations (though I don't know what exactly nice means...) the following two numbers are equal:

1.) The codimension of the support of $M$

2.) The biggest $k$ such that $ext^k(M,.)$ doesn't vanish

Why do we expect this intuitively? Why should lenghts of injective/projective/flat resolutions have anything to do with the support?