Skip to content

[REFACTOR/143] 랭킹 조회시 발생하는 N+1 문제 해결#146

Merged
persi0815 merged 6 commits intodevelopfrom
refactor/143
Jan 23, 2025
Merged

[REFACTOR/143] 랭킹 조회시 발생하는 N+1 문제 해결#146
persi0815 merged 6 commits intodevelopfrom
refactor/143

Conversation

@persi0815
Copy link
Contributor

@persi0815 persi0815 commented Jan 15, 2025

PR 타입

  • 리펙토링

구현한 기능

  • Fetch Join
  • Batch Fetching
  • EntityGraph (최종 선택)

테스트 결과

  • Fetch Join
    image

  • Batch Fetching
    image

  • EntityGraph
    image

설명

내용 정리한 블로그

일정

  • 추정 시간 : 2 days
  • 걸린 시간 : 1 day

@persi0815 persi0815 self-assigned this Jan 15, 2025
@persi0815 persi0815 linked an issue Jan 15, 2025 that may be closed by this pull request
Copy link
Contributor

@ParkSangsin ParkSangsin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다!! 많이 배워갑니당 ㅎㅎ


Optional<EnhanceItem> findByUserAndItem(User user, Item item);

@EntityGraph(attributePaths = {"user"}) // N+1 문제 해결 위한 EntityGraph 방식
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

결국 Entity Graph를 선택하셨군요.. 좋습니다!

@persi0815 persi0815 merged commit 0b46277 into develop Jan 23, 2025
@persi0815 persi0815 deleted the refactor/143 branch May 2, 2025 01:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[REFCTOR] N+1 문제 해결

2 participants