Follow-up from "Optimize query for reference parser"
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
The following discussion from !62490 (merged) should be addressed:
question (non-blocking): Does the spec on line 39 have a similar problem?
avoids N+1 queries in #records_for_nodes
. You could move the N+1 spec improvements into a separate MR if you prefer.
The following discussion from !62490 (merged) should be addressed:
question: I thought the N+1 queries spec would fail if the
includes(:project_feature, :group, :namespace)
is removed, but it doesn't. Is that expected?
We need to verify 'no project N+1 queries' test suite too. It has a N+1 problem for can?(user, :read_merge_request_iid, object)
call.
SELECT MAX("project_authorizations"."access_level") AS maximum_access_level, "project_authorizations"."user_id" AS project_authorizations_user_id FROM "project_authorizations" WHERE "project_authorizations"."project_id" = 1 AND "project_authorizations"."user_id" = 1 GROUP BY "project_authorizations"."user_id" /*application:web,correlation_id:01F6MWKB6Q1N951ZHRP7SKG1R0,endpoint_id:Projects::BlobController#show,line:/app/models/project_team.rb:173:in `block in max_member_access_for_user_ids'*/
Edited by 🤖 GitLab Bot 🤖