Look at the model of ‘Generate User Table’:
We have one database access in ‘Find All Users’, and then, for each user record, we call the ‘Convert User Record to Row’ process, which accesses the database again to get the user’s roles: This means, if there are ‘n’ users defined in the system, we access the database 1+n times. As long as ‘n’ is not big, this is acceptable for the (rather rare) browsing of the user table, but a more efficient model can build the user table with a single database access: Instead of a repetitive process where each occurrence reads the roles of one user, we can read all user roles together. Simply replace the ‘Find User_Roles for User’ service (within ‘Build Role List for User’) by a ‘Find’ that will return all records in the ‘User_Roles’ table. Now divide the records to groups according to the ‘User’ field (using the Group Items template), where each group contains the records for one user. This will create a somewhat more complex model, but the performance will be better.
Instead of a repetitive process where each occurrence reads the roles of one user, we can read all user roles together. Simply replace the ‘Find User_Roles for User’ service (within ‘Build Role List for User’) by a ‘Find’ that will return all records in the ‘User_Roles’ table. Now divide the records to groups according to the ‘User’ field (using the Group Items template), where each group contains the records for one user. This will create a somewhat more complex model, but the performance will be better.
To use the full functionality of this web site, JavaScript needs to be turned on.
For best results, use the Firefox browser..
Copyright © 2003-2017 - Tersus Software Ltd., All rights reserved. Terms of Use License Graphic design by EmaraDesign