Dense kernel matrices Θ ∈ R N ×N obtained from point evaluations of a covariance function G at locations {x i } 1≤i≤N arise in statistics, machine learning, and numerical analysis. For covariance functions that are Green's functions elliptic boundary value problems and approximately equally spaced sampling points, we show how to identify a subset S ⊂ {1, . . . , N } × {1, . . . , N }, with #S = O N log(N ) log d (N/ ) , such that the zero fill-in block-incomplete Cholesky decomposition of Θ i,j 1 (i,j)∈S is an -approximation of Θ. This block-factorisation can provably be obtained in O N log 2 (N ) log (1/ ) + log 2 (N ) 4d+1 complexity in time. Numerical evidence further suggests that element-wise Cholesky decomposition with the same ordering constitutes an O N log 2 (N ) log 2d (N/ ) solver. The algorithm only needs to know the spatial configuration of the x i and does not require an analytic representation of G. Furthermore, an approximate PCA with optimal rate of convergence in the operator norm can be easily read off from this decomposition. Hence, by using only subsampling and the incomplete Cholesky decomposition, we obtain at nearly linear complexity the compression, inversion and approximate PCA of a large class of covariance matrices. By inverting the order of the Cholesky decomposition we also obtain a near-linear-time solver for elliptic PDEs.