wow. so optimize. Get big debug queries to lighter.

Modifying the process of getting statistical queries in the debug page
so that they use up less memory, process faster, retrieve less fields
and don't uselessly cache. Resolves #314