Skip to content

Reduce SQL queries needed to load open merge requests

Stan Hu requested to merge sh-optimize-merge-request-project-lookup into master

The SQL queries and memory allocation in MergeRequests::RefreshService is dominated by queries for Project and Route loads. On staging, the absence of an inverse relationship caused Rails to make around 1100 extraneous SQL queries for the www-gitlab-com repository.

Relates to #49703 (moved)

Edited by Stan Hu

Merge request reports