-
Notifications
You must be signed in to change notification settings - Fork 0
[REFACTOR] 오늘의 발견 API 리팩토링 #323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
| .map(novelId -> jpaQueryFactory | ||
| .selectFrom(feed) | ||
| .leftJoin(feed.likes, like) | ||
| .where(feed.novelId.eq(novelId)) | ||
| .groupBy(feed.feedId) | ||
| .orderBy(like.count().desc()) | ||
| .fetchFirst()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
기존에는 novelId마다 쿼리가 발생함
ChaeAg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오 쿼리 최적화를 진행하셨군요! 멋진데요? 테스트 해보셨을때 결과는 어땠나요 ㅎㅎ 많이 좋아졌나요?
Kim-TaeUk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
요거 인증인가 리팩터링한거 반영되면 수정해서 붙이죠!
Related Issue
Key Changes
findPopularFeedsByNovelIds()함수에서 쿼리 최적화를 진행해보았습니다.findPopularFeedsByNovelIds()에서 바로 Map을 반환하게 하여createFeedMap()함수를 제거했습니다.To Reviewers
References