We are migrating an old forum with 1.6 million messages to Discourse. When opening the home page as logged in user, there is a super query taking too long to execute (many seconds). We are still testing so there is only one user - me.
We are on AWS using RDS. On our default machine, it took more than 13s to return this query. I updated to a xlarge super machine for testing and still this query take more than 500ms.
More than 500ms isn’t outside the realms of normal. Do you have unusual permissions on the categories? Have you tested with an anonymous or new user rather than a staff user?