Slow SQL query causes homepage to load in 2-4 sec

Can you try applying:

https://github.com/discourse/discourse/commit/884b9d4b78c39eab83f1ef39703a348459ca7764

Just update to latest tests-passed (once it hits in a few minutes)