From 08c3e59aeed34ad71e74afb674ddda7327fdc3a7 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Mon, 9 Sep 2019 17:05:55 -0700 Subject: 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 --- changelogs/unreleased/sh-fix-oauth-application-page.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 changelogs/unreleased/sh-fix-oauth-application-page.yml (limited to 'changelogs') diff --git a/changelogs/unreleased/sh-fix-oauth-application-page.yml b/changelogs/unreleased/sh-fix-oauth-application-page.yml new file mode 100644 index 00000000000..9ac78db2c79 --- /dev/null +++ b/changelogs/unreleased/sh-fix-oauth-application-page.yml @@ -0,0 +1,5 @@ +--- +title: Optimize /admin/applications so that it does not timeout +merge_request: 32852 +author: +type: performance -- cgit v1.2.3