Optimized retrieving user ids in user-role.