Given a general second-order, elliptic operator P on a general domain, we discuss the question of finding an "optimal", or "asymptotically optimal", Hardy inequality for P. Such an inequality can be considered as a generalized spectral gap inequality of P. If time allows, we will also consider the $L^p$ case.