Fix the explore page using too much memory

Using some direct SQL calls is far more efficient.

[#79969292]