Skip to content

Refactor: 팀 결정사항 목록 조회 N+1 개선#26

Merged
ggamnunq merged 1 commit into
developfrom
refactor/decision
May 14, 2026
Merged

Refactor: 팀 결정사항 목록 조회 N+1 개선#26
ggamnunq merged 1 commit into
developfrom
refactor/decision

Conversation

@Yujin1219
Copy link
Copy Markdown
Member

🎯 작업 내용

주요 변경사항

  • 팀 결정사항 목록 조회 쿼리를 엔티티 fetch join 방식에서 DTO projection 방식으로 변경했습니다.
  • DecisionResponse.DecisionFlatRow를 추가해 목록 응답에 필요한 컬럼만 조회하도록 수정했습니다.
  • 조회 결과 row를 decisionId 기준으로 그룹핑해 기존 DecisionListDTO 응답 형태를 유지했습니다.

상세 내용

  • 기존 결정사항 목록 조회에서는 decision-> meeting fetch join하면서 meetingAnalysis의 @OneToOne 기본 EAGER 로딩이 됐습니다.
    목록 조회에서는 분석 결과가 필요하지 않아서Meeting 엔티티를 직접 로딩하지 않고 필요한 컬럼만 조회해 meeting_analysis N+1 쿼리를 제거했습니다.
2026-05-14T23:36:17.414+07:00  INFO 91741 --- [io-8080-exec-10] c.w.s.g.a.LoggingWriter                  : [API START] requestId=45095d6f-1db3-4191-8845-94ef4bab2b38 member=41 api=TeamController.getDecisions method=GET uri=/api/teams/22/decisions startedAt=2026-05-15T01:36:17.414194
Hibernate: 
    select
        d1_0.decision_id,
        m1_0.name,
        a1_0.application_id,
        a1_0.name 
    from
        decision d1_0 
    join
        meeting m1_0 
            on m1_0.meeting_id=d1_0.meeting_id 
    left join
        application a1_0 
            on d1_0.decision_id=a1_0.decision_id 
    where
        m1_0.team_id=? 
    order by
        d1_0.decision_id
2026-05-14T23:36:18.252+07:00  INFO 91741 --- [io-8080-exec-10] c.w.s.g.a.LoggingWriter                  : [API END] requestId=45095d6f-1db3-4191-8845-94ef4bab2b38 member=41 api=TeamController.getDecisions method=GET uri=/api/teams/22/decisions endedAt=2026-05-15T01:36:18.252492 durationMs=838 status=200 outcome=SUCCESS

✅ 체크리스트

  • 코드 빌드가 정상적으로 완료되었나요?
  • 코드 리뷰 요청 전 self-review를 진행했나요?

📋 API 명세서

💬 리뷰 요청사항 (선택)

📚 참고 자료 (선택)

@Yujin1219 Yujin1219 requested a review from ggamnunq May 14, 2026 16:42
@Yujin1219 Yujin1219 self-assigned this May 14, 2026
@ggamnunq
Copy link
Copy Markdown
Contributor

아주굿

@ggamnunq ggamnunq merged commit 58d4406 into develop May 14, 2026
1 check passed
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