We are seeing slowness on our servers from this query:
We tracked the query down to get_config method which is being called from initialise_cfg.
So, it appears that on every page page load, this query is being executed. Also, the reason for the query seems a little odd, like for detecting if we are doing an install or similar. I looked at the original code that added this in and it used to disable caches when the query failed, but that line was removed.
Anyways, seeking advice on refactoring so this query isn't executed on every page.