N+1 SQL queries in MergeRequestsController#ci_environment_status
On GitLab.com, there are significant number of slow endpoints coming from MergeRequestsController#ci_environment_status
: https://log.gitlab.net/goto/52d53c5de5dd9d3300e434234c620553
The performance bar shows close to 1000 SQL queries retrieving clusters:
SQL backtraces:
Followup:
Edited by Thong Kuah