Restrict use of CTE fence to dashboards/projects#index
In https://gitlab.com/gitlab-org/gitlab/merge_requests/23754, we added a CTE optimization fence to ensure loading a user's projects is always fast. However, using a CTE for the dashboard/projects/starred endpoint is less efficient than the default query because that endpoint also loads public and internal projects. For now, we can just restrict use of this CTE for the `index` action. In the future, we may want to put this logic inside ProjectsFinder. Closes https://gitlab.com/gitlab-org/gitlab/issues/201994
Showing
Please register or sign in to comment