Troubleshooting user and organization search performance
Searching for organizations and users in Management Center times out or uses high CPU.
Problem
Searching for users and organizations may time out or use high CPU if there are more than 50,000 organizations or there are a high number of RegisteredCustomer member groups.
Solution
In MemberSearch.xml, two sets of organizations are retrieved based on the two sets of roles listed in the XML. The first set includes organizations where the user directly has one of the first sets of seller roles and sub-organizations of those organizations.
The second set includes buyer organizations that the user can access indirectly via RegisteredCustomer member groups: You find all the organizations where the user has any of the second set of roles. You then check to see if any of those organizations own a member group called RegisteredCustomer. If so, you return all the buyer organizations in those member groups. A buyer organization is added to this type of member group when it registers to a B2B store. This second sub-query is more costly, especially when there are many organizations or many of these member groups, so you can remove it to improve performance. However, removing it will remove these buyer organizations from the results. If you don't need your seller admin users to manage buyer organizations, you can disable the second query as follows:
- Open the
workspace_dir\WC\xml\tools\buyerconsole\MemberSearch.xml
file for editing.Important: The MemberSearch.xml file is not extendable. That is, any changes that are made to the file are overwritten when HCL Commerce updates. Ensure that you track any changes that are made to the file, so that you can reapply them after HCL Commerce updates.
- Comment out both occurrences of the following
snippet:
<subQuery number="2" > <role name="Seller Administrator" /> <role name="Seller" /> <role name="Sales Manager" /> <role name="Account Representative" /> <role name="Customer Service Representative" /> <role name="Customer Service Supervisor" /> </subQuery>The snippet appears within the
<organizationSearch>and<userSearch>sections of the file. - Save your changes and close the file.