babumahesh opened a new pull request, #10589:
URL: https://github.com/apache/gravitino/pull/10589

   ### What changes were proposed in this pull request?
   
   Eliminates N+1 query problems when resolving metadata object names for Tags, 
Policies, and Job Templates by implementing batch query methods.
   
   ###Why are the changes needed
   
   - Previously, when fetching names for multiple metadata objects 
(tags/policies/job templates), the code would issue one SQL query per object ID 
in a stream. This creates N+1 query performance problems, especially when 
dealing with large numbers of objects.
   - Implemented batch query methods using MyBatis `<foreach>` to fetch 
multiple records in a single SQL query with an `IN` clause.
   - The service layer now batches all IDs and makes one query instead of N 
individual queries.
   
   Fix: #10459 
   
   ###How was this patch tested?
   
   All the existing unit tests and integrations tests ran and should be 
sufficient as there is no behaviour changes 
   


-- 
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