-
Notifications
You must be signed in to change notification settings - Fork 0
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
[Feat] 알림 목록 조회 / 알림 읽음 처리 기능 개발 #282
Conversation
다시짜 🤖 |
1 similar comment
다시짜 🤖 |
테스트통과 🤖 |
.where(notification.user.eq(user) | ||
.and(notification.id.lt(cPage.getCursor())) | ||
) |
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.
쿼리 속도 향상을 위해서 (user_id, notification_id)
로 인덱스 추가가 필요해보에요
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.
notification id로 인덱스를 탈거라서, 지켜보시죠~
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.
지금 상태에선 괜찮아보여요
제가 생각한 내용은
테이블에 (user_id, notification_id)가 아래처럼 있을 때(키위가 잘 돼서 ㅎㅎ;)
(1, 1000)
...
(1, 2000)
...
(1, 3000)
user id = 1, notification id = 3000 요청이 들어오면
notification_id 인덱스를 타더라도 3000부터 1000까지 모든 레코드를 읽어야 하는 문제였어요
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.
네 의도 이해는 하고 있어요 ㅎㅎ
keewe-api/src/main/java/ccc/keeweapi/controller/api/notification/NotificationController.java
Outdated
Show resolved
Hide resolved
...i/src/main/java/ccc/keeweapi/service/notification/command/NotificationCommandApiService.java
Show resolved
Hide resolved
...main/java/ccc/keewedomain/service/notification/command/NotificationCommandDomainService.java
Outdated
Show resolved
Hide resolved
테스트통과 🤖 |
테스트통과 🤖 |
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.
LGTM 👍
고생하셨습니다 ㅎㅎ
관련 Issue
작업 내용
테스트 안해봄 ㅎ
Next TODO: 알림 생성
Figma