Skip to Content.
Sympa Menu

grouper-users - Re: [grouper-users] Group Membership Queries

Subject: Grouper Users - Open Discussion List

List archive

Re: [grouper-users] Group Membership Queries


Chronological Thread 
  • From: Shilen Patel <>
  • To:
  • Subject: Re: [grouper-users] Group Membership Queries
  • Date: Mon, 30 Jul 2007 11:37:53 -0400

Hello,

This is just a quick follow up to the previous email to mention how this operation can be improved. As mentioned before, if you want to run Group.getMembers() on a group with 30,000 members, there will be 30,000 SELECT queries on the grouper_members table.

You can easily reduce that down to 1 query using a join like the following where you're getting all members in a specified group.

select m.id as id, m.member_uuid as member_u2_,
m.subject_id as subject_id, m.subject_source as subject_4_,
m.subject_type as subject_5_
from grouper_members m, grouper_memberships ms
where owner_id=? and ms.list_name='members' and ms.list_type='list' and ms.member_id = m.MEMBER_UUID


Thoughts?

Thanks,

-- Shilen


Shilen Patel wrote:
Hello,

This is regarding the membership queries we discussed in the call. Running Group.getMembers() in the API causes the following query to execute once per each member.

Hibernate: select hibernatem0_.id as id, hibernatem0_.member_uuid as member_u2_, hibernatem0_.subject_id as subject_id, hibernatem0_.subject_source as subject_4_, hibernatem0_.subject_type as subject_5_ from grouper_members hibernatem0_ where (hibernatem0_.member_uuid=? )


Thanks,

-- Shilen



  • Group Membership Queries, Shilen Patel, 07/25/2007
    • Re: [grouper-users] Group Membership Queries, Shilen Patel, 07/30/2007

Archive powered by MHonArc 2.6.16.

Top of Page