From 351d0c28dc8912075fdbb0a28e7356633c837931 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Thu, 15 Mar 2018 17:18:14 -0700 Subject: Fix timeouts loading /admin/projects page These extra sort keys caused sequential scans on the namespaces and projects page. Removing them makes the page load on GitLab.com. Closes #44338 --- app/finders/admin/projects_finder.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'app/finders') diff --git a/app/finders/admin/projects_finder.rb b/app/finders/admin/projects_finder.rb index d6bcd939522..5c507fe8d50 100644 --- a/app/finders/admin/projects_finder.rb +++ b/app/finders/admin/projects_finder.rb @@ -16,8 +16,7 @@ class Admin::ProjectsFinder items = by_archived(items) items = by_personal(items) items = by_name(items) - items = sort(items) - items.includes(:namespace).order("namespaces.path, projects.name ASC").page(params[:page]) + sort(items).page(params[:page]) end private -- cgit v1.2.3