Follow-up from "Link fast-forward MRs to deployment"
The following discussion from !145211 (merged) should be addressed:
-
@partiaga started a discussion: (+2 comments) Hi @nmilojevic1 would you mind giving this the initial database review?
I've added the query plans in the description.
The EXPLAIN output for both "before" and "after" gives me a "Looks good
✅ " result, but would there be a way to simplify this?project.merge_requests.merged.by_merge_commit_sha_or_head_commit_sha(commits)
-- "transforms" into something rather complex. The
WHERE "merge_requests"."target_project_id" = 36 AND "merge_requests"."state_id" = 3
gets repeated 3 times.As I mentioned here, I'm not really super concerned about performance. This isn't an N+1 query and Database Labs doesn't have an improvement recommendation, but I'm wondering if there's a way to simplify it
🙂