Sorry in advance if my question does not have the required level. 
Let $K$ be a commutative ring (let say an integral domain for simplicity) and let $0\neq s\in K$. Let $K[s^{-1}]$ be the localized ring. When $K[s^{-1}]$ is a compact object in the derived category $D(K)$ ? 



compact objects and derived categories
In short: essentially only when $s$ is idempotent (up to multiplication by a unit), otherwise $K[s^{-1}]$ is not even finitely generated as a module. Obviously, if $K$ is a domain then $s = 0$ or $1$ and in these cases $K[s^{-1}] = K$ or the trivial module $0$.


A complex of $K$-modules is compact if and only if it is *perfect*, i.e. quasi-isomorphic to a bounded complex of projective modules. For a single module this means that it has a bounded resolution of projective, finitely generated, modules. In particular, the module has to be finitely generated.


