yuqi1129 opened a new issue, #10545:
URL: https://github.com/apache/gravitino/issues/10545

   ### What would you like to be improved?
   
   `loadRolePrivilege` will repeatedly access database if the cache is 
disabled. 
   
   ```
   ① SELECT user entity                             (1 次)
   ② SELECT role stubs JOIN user_role_rel           (1 次,批量)
   ③ for each role N:
        SELECT role metadata                        (1 次/角色)  ← N+1 根因
        SELECT securable objects by role_id         (1 次/角色)  ← N+1 根因
   ④ for each distinct resource type T:
        SELECT full names WHERE id IN (...)         (1 次/类型,已批量)
   ⑤ SELECT owner record                           (1 次)
   ```
   
   ### How should we improve?
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to