Skip to content

[TD-3] AlertService N+1 쿼리 제거 #98

Description

@ohhalim

문제

AlertService.checkAndNotify() 루프 안에서:

  • existsByWatchlistIdAndSentAtAfter를 watchlist 수만큼 호출
  • lazy loading getMember(), getCourse()

해결

  • alertLog를 watchlistId IN 쿼리로 일괄 조회 후 메모리 필터
  • watchlist 조회 시 member/course fetch join

영향 파일

  • watchlist/service/AlertService.java
  • watchlist/repository/WatchlistRepository.java, AlertLogRepository.java

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions