Commit Graph

6 Commits

Author SHA1 Message Date
GitLab Bot ce5c259086 Add latest changes from gitlab-org/gitlab@master 2022-08-19 21:11:26 +00:00
GitLab Bot 054378fd4a Add latest changes from gitlab-org/gitlab@master 2022-08-12 21:11:43 +00:00
GitLab Bot ee772e0c77 Add latest changes from gitlab-org/gitlab@master 2022-08-12 12:11:32 +00:00
GitLab Bot 24d67ec554 Add latest changes from gitlab-org/gitlab@master 2022-07-01 18:08:33 +00:00
GitLab Bot c59765a50a Add latest changes from gitlab-org/gitlab@master 2020-06-24 18:09:03 +00:00
Stan Hu 08c3e59aee Optimize /admin/applications so that it does not timeout
On our dev instance, /admin/applications as not loading because:

1. There was an unindexed query by `application_id`.
2. There was an expensive query that attempted to load 1 million
   unique entries via ActiveRecord just to find the unique count.

We fix the first issue by adding an index for that column.

We fix the second issue with a simple SELECT COUNT(DISTINCT
resource_owner_id) SQL query.

In addition, we add pagination to avoid loading more than 20
applications at once.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/67228
2019-09-09 21:51:57 -07:00