$(X, \mathcal{B}, \mu)$ is a measure space.


* Is there any well-known criteria for compactness of a closed set in $L^2(X, \mu)$?
* If the answer is negative what about $L^2(\mathbb{R}^n,\mu)$(in this part $\mu$ is Lebesgue measure)?



Criteria for Compactness of a Closed in $L^2$ Spaces
For Lebesgue measure, look at the [Fréchet-Kolmogorov theorem](http://en.wikipedia.org/wiki/Fr%C3%A9chet-Kolmogorov_theorem).


For a general measure space, see Theorem 4.7.28 of Bogachev's *Measure Theory*, which is attributed to Riesz. Let $\pi = \{E\_1, \dots, E\_k\}$ be a collection of disjoint measurable subsets of $X$ having finite positive measure. ($\pi$ is almost a partition of $X$ but it can omit a set of cofinite measure.) For $f \in L^p(X,\mu)$, let $$\mathbb{E}^\pi f(x) = \begin{cases} \frac{1}{\mu(E\_i)} \int\_{E\_i} f\,d\mu, & x \in E\_i \\ 0, & x \notin \bigcup E\_i.\end{cases}$$ Note that all the integrals exist since they are taken over sets of finite measure.


Write $\pi\_1 \le \pi\_2$ if every set in $\pi\_1$ is a union of sets from $\pi\_2$, up to sets of measure zero. Think of $\pi\_2$ as being a sort of "refinement" of $\pi\_1$, except that $\pi\_2$ can also pick up some of $X \setminus \bigcup \pi\_1$. 


Then the result is that $K \subset L^p(\mu)$ is compact iff it is closed and bounded and $\mathbb{E}^\pi f \to f$ in $L^p$ norm, uniformly on $K$, as $\pi$ becomes increasingly refined. More precisely, a closed bounded $K$ is compact iff for every $\epsilon$ there exists $\pi\_0$ such that for all $\pi \ge \pi\_0$ and all $f \in K$ we have $\|\mathbb{E}^\pi f - f\|\_{L^p(\mu)} < \epsilon$. 


(Bogachev states it in the following equivalent way: view $\{\sup\_{f \in K} \|\mathbb{E}^\pi f - f\|\_{L^p}\}$ as a net in $[0,\infty)$ indexed by the set of all $\pi$. Then the necessary and sufficient condition is that this net should converge to 0.)


