  Krylov complexity has been proposed as a diagnostic of chaos in
non-integrable lattice and quantum mechanical systems, and if the system is
chaotic, Krylov complexity grows exponentially with time. However, when Krylov
complexity is applied to quantum field theories, even in free theory, it grows
exponentially with time. This exponential growth in free theory is simply due
to continuous momentum in non-compact space and has nothing to do with the mass
spectrum of theories. Thus by compactifying space sufficiently, exponential
growth of Krylov complexity due to continuous momentum can be avoided. In this
paper, we propose that the Krylov complexity of operators such as
$\mathcal{O}=\textrm{Tr}[F_{\mu\nu}F^{\mu\nu}]$ can be an order parameter of
confinement/deconfinement transitions in large $N$ quantum field theories on
such a compactified space. We explicitly give a prescription of the
compactification at finite temperature to distinguish the continuity of
spectrum due to momentum and mass spectrum. We then calculate the Krylov
complexity of $\mathcal{N}=4, 0$ $SU(N)$ Yang-Mills theories in the large $N$
limit by using holographic analysis of the spectrum and show that the behavior
of Krylov complexity reflects the confinement/deconfinement phase transitions
through the continuity of mass spectrum.
