Collective elements apply to all users in a scenario, and they require the Scenarios module to generate line-by-line queries of the dps_user
and dps_user_scenario
tables. These queries can run slowly if the number of profiles is high.
Consider the following example:
![This diagram is described in surrounding text](media/image16.png)
This scenario generates a query similar to the following:
SELECT DISTINCT t1.id,t1.id FROM dps_user t1 WHERE ((t1.login IS NOT NULL) AND NOT EXISTS (SELECT * FROM dps_user_scenario WHERE id = t1.id AND ind_scenario_id IN ( SELECT tt1.id FROM dss_ind_scenario tt1 WHERE (tt1.creator_id = '4000001')))) ORDER BY t1.id ASC;
The query searches the dps_user
table for profiles that have a defined login name, and it also searches the dps_user_scenario
table to make sure none of those profiles already has a scenario instance created for this scenario. As more profiles are found that match the query, more scenario instances are created, which in turn adds more lines to the dps_user_scenario
table. For sites with an unusually large number of profiles, this process can eventually become very slow.
You can improve performance by checking that the maxBatchSize
setting in the Scenario Manager component is set to at least the default value, 1000, and adjusting it if necessary A higher setting enables the Scenarios module to process more profiles with each iteration of the query.
To examine the profile queries that your scenarios generate, turn on the loggingDebug
property for the /atg/userprofiling/ProfileAdapterRepository
component. The queries appear in the <ATG10dir>\home\logs\debug.log
file.