Skip to content
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

edit : 채팅 방 조회 기능 리팩토링 #172

Merged
merged 6 commits into from
Apr 19, 2024
Merged

edit : 채팅 방 조회 기능 리팩토링 #172

merged 6 commits into from
Apr 19, 2024

Conversation

kkangh00n
Copy link
Collaborator

@kkangh00n kkangh00n commented Apr 18, 2024

⛏ 작업 상세 내용

  1. 채팅방 목록 조회 시 응답 필드 추가

기존

  • 모임 정보

변경

  • 모임 정보
  • 채팅방 별 읽지 않은 메시지 갯수
  • 마지막으로 받은 채팅 함께 응답
    (카카오톡 채팅방 목록에서 마지막 메시지 보여주는 거 생각하시면 됩니다)
    image
  1. 채팅방 목록 조회 시, 필요한 데이터만 갖고오도록 쿼리 수정
  • 쿼리를 좀 더 핏하게 갖고오도록 하엿습니다

✅ 중점적으로 리뷰 할 부분

  1. 효율적인 쿼리
    채팅방 목록 조회 기능에서 다음과 같이 쿼리가 3방이 나갑니다
  • 채팅방 목록 조회
  • 채팅방 별 읽지 않은 메시지 갯수 조회
  • 채팅방 별 마지막 채팅 조회

이 쿼리 3개를 통합해서 줄이고 싶었는데, 방법이 없는 것 같아 여쭙고 싶습니다..!

  1. 만약 위의 사항의 개선사항이 뚜렷하지 않다면, 추가된 쿼리와 테스트 케이스를 봐주시면 감사합니다

참고사항

  • 커밋 별로 보시면 됩니다!

@kkangh00n kkangh00n added the Edit 기능 수정 label Apr 18, 2024
@kkangh00n kkangh00n requested a review from dlswns2480 April 18, 2024 11:31
@kkangh00n kkangh00n self-assigned this Apr 18, 2024
Copy link
Collaborator

@dlswns2480 dlswns2480 left a comment

Choose a reason for hiding this comment

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

중요한 작업이라 리뷰하는데 좀 걸렸네요!
쿼리 짜느라 고생하셨습니다ㅎㅎ 현재로선 저도 저 쿼리 3방 나가는게 최선이라 생각됩니다!
추후에 더 줄일 수 있는 게 생각나면 공유하겠습니다! 일단은 저 3개 쿼리 각각에 대해 성능 튜닝하는 걸 고려해보는게 좋은 것 같슴다!

@kkangh00n kkangh00n merged commit 3a8a3ce into dev Apr 19, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Edit 기능 수정
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants