I have heard and read in various sources that the unitary group $U(p,q)(\mathbb{R})$ is compact if and only if $p = 0$ or $q = 0$. However I don't know of a proof (or a reference for one). Is this easy to see?
Here, let $D = D_{p,q}$ be the $(p+q)\times (p+q)$ diagonal matrix with $p$-many 1's and $q$-many $-1$'s, then $U(p,q)$ is the group of matrices $g\in GL_{p+q}(\mathbb{C})$ with $g^*Dg = D$, where $\cdot^*$ denotes conjugate transpose.
If $p,q>0$, then $U(p,q)$ contains every matrix of the type$$\begin{bmatrix}\sqrt{x^2+1}&0&0&\ldots&0&0&x\\0&1&0&\ldots&0&0&0\\&\vdots&&\ddots&&\vdots\\0&0&0&\ldots&0&1&0\\x&0&0&\ldots&0&0&\sqrt{x^2+1}\end{bmatrix},$$with $x\in\Bbb R$. So, it's unbounded, and therefore it's not compact.