You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using UAA version: 77.10.0
We are on MYSQL DB: 8.0.mysql_aurora.3.05.2
In ScimUserEndpoint.java, we fetch complete user data from RDS, for given identity_zone_id.
Case 1:
In findUsers() -> syncGroup() -> getGroupsWithMember() → we again fetch the user data from RDS.
Problem: This looks like repeated query on Database.
Can we have a check, before checking in DB for users, that if this user was already fetched from last query, we will avoid querying on User table again.
And only in case the user is coming from another transitive group, we can have this check.
Case 2:
Similarly, in same flow, we fetch default user groups for user.
getDefaultUserGroups(),
Problem: Again this query is being performed repeatedly on Database. For 100 users, 100 times for 1 request.
Whereas the default groups remains same for an identity zone.
Case 3:
We already have index as "CREATE UNIQUE INDEX group_membership_unique_key ON group_membership (member_id,group_id);"
However for below example of query:
SELECT g.id, g.displayName, g.description, g.created, g.lastModified, g.version, g.identity_zone_id
FROM groups g, group_membership gm
WHERE gm.group_id = g.id
AND gm.identity_zone_id = g.identity_zone_id
AND gm.identity_zone_id = 'my_identity_zone'
AND gm.member_id IN ('my_user_id');
The above query is giving us performance issues, so it may require another composite index as below:
CREATE INDEX idx_group_membership_zone_member_group
ON group_membership (identity_zone_id, member_id, group_id);
Can we analyze the performance of this query and add any composite index if required?
The text was updated successfully, but these errors were encountered:
@rohit-armorikar Thanks for reporting... we (SAP) use postgresql and we have additional indexes created, however we should check if in mysql something missing or a general problem, means also in postgresql.
We have improved /Users with some PRs @adrianhoelzl-sap can you help here, please ?
FYI @torsten-sap can you ask someone from your team in addition if there is something we know about
We are using UAA version: 77.10.0
We are on MYSQL DB: 8.0.mysql_aurora.3.05.2
In ScimUserEndpoint.java, we fetch complete user data from RDS, for given identity_zone_id.
Case 1:
In findUsers() -> syncGroup() -> getGroupsWithMember() → we again fetch the user data from RDS.
Problem: This looks like repeated query on Database.
Can we have a check, before checking in DB for users, that if this user was already fetched from last query, we will avoid querying on User table again.
And only in case the user is coming from another transitive group, we can have this check.
Case 2:
Similarly, in same flow, we fetch default user groups for user.
getDefaultUserGroups(),
Problem: Again this query is being performed repeatedly on Database. For 100 users, 100 times for 1 request.
Whereas the default groups remains same for an identity zone.
Case 3:
We already have index as "CREATE UNIQUE INDEX group_membership_unique_key ON group_membership (member_id,group_id);"
However for below example of query:
SELECT g.id, g.displayName, g.description, g.created, g.lastModified, g.version, g.identity_zone_id
FROM groups g, group_membership gm
WHERE gm.group_id = g.id
AND gm.identity_zone_id = g.identity_zone_id
AND gm.identity_zone_id = 'my_identity_zone'
AND gm.member_id IN ('my_user_id');
The above query is giving us performance issues, so it may require another composite index as below:
CREATE INDEX idx_group_membership_zone_member_group
ON group_membership (identity_zone_id, member_id, group_id);
Can we analyze the performance of this query and add any composite index if required?
The text was updated successfully, but these errors were encountered: