Commit 351d0c28 authored by Stan Hu's avatar Stan Hu

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
parent 16d92de1
Pipeline #18992454 passed with stages
in 46 minutes and 1 second
......@@ -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
......
---
title: Fix timeouts loading /admin/projects page
merge_request:
author:
type: performance
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment