Skip to content

Conversation

@shaykeren
Copy link

This PR addresses the N+1 query performance issue in the GET /owners endpoint by:

  1. Changed pets relationship in Owner entity from EAGER to LAZY fetching
  2. Added @batchsize optimization for better performance
  3. Updated OwnerRepository with efficient JOIN FETCH queries
  4. Maintained backward compatibility

These changes will significantly reduce the number of database queries executed when fetching owners list.

Related issue: #7b3242ee-6c77-11f0-a006-1ac08f985233
Trace ID: 00000000000000004214E9084E40BFF3

Testing:

  • Verified reduced query count in logs
  • Maintained existing functionality
  • Performance improvement confirmed

Please review the changes and test in your environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants