Simplify query for `authorized_groups_without_shared_membership`
What does this MR do and why?
This MR simplifies the query in User#authorized_groups_without_shared_membership
More details in !122323 (comment 1414328861)
Query plan
User#authorized_groups_without_shared_membership
is a private method, and is internally used in the public method User#authorized_groups
, so checking the full query formed in User#authorized_groups
would be the right way to measure the query performance:
User#authorized_groups
query performance
Before the fix: https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/19068/commands/62968
After the fix: https://postgres.ai/console/gitlab/gitlab-production-tunnel-pg12/sessions/19068/commands/62969
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.