[#115] Refactor: N+1 문제 해결 및 JPA 쿼리 성능 개선 #116
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PULL REQUEST
🎋 Branch Name
refactor/#115
🔑 Main Contents
이를 통해 추가적인 DB 접근 조회를 최소화하며 보다 직관적인 코드로 작성 가능해짐.
==> 이러한 두가지 리팩토링을 통하여, DB 접근 성능을 보다 개선함.
🏞 Screenshots (Optional)
기존 SQL 쿼리문 (쿼리 2번 발생) / N+1 해결후 SQL 쿼리문 (쿼리 1번 발생)
📋 Checks for reviewers (Optional)
이처럼 EntityGraph 어노테이션을 적용함으로써,
위의 스크린샷(적용전,적용후)처럼 기존에 발생하던 N+1 문제를 해결하였습니다.