rows will itself not require much time in one aspect this decision is cached in a user information data structure kept by the running application servers 100 e g with a timeout value in this manner even though the calculation itself may be relatively lightweight it is only performed periodically while a user is logged in to focus on how the u201c boss u201d vs u201c lower level employee u201d decision should drive an appropriate query plan consider a query of the form u201c show me all accounts that i can see u201d in a private account sharing model an example of a data model for sharing appears in fig3 middle table is sharing table final table is the user group u201c blowout u201d table which describes which users are contained in a group or above a user in the role hierarchy ug user or group according to one aspect for a u201c lower level employee u201d user it is typically most advantageous to join these tables starting from the right filtering on users id to form a temporary result of the rows that can be seen because the user can not see many rows this will yield a relatively selective path an example query follows conversely for a u201c boss u201d user who can see most of the entity records in the organization it is typically most advantageous to begin the query from the left and use a nested loop query plan onto the sharing table acc_share an example of which follows note that this query in general runs in relatively constant reasonable time for all users in an organization it may not be particularly fast since it must look at all top level entity records but it is suitable for a boss who can in fact see most.