Repository navigation
쿼리 횟수 및 메모리 최적화 - #242
Merged
Hidden character warning
The head ref may contain hidden characters: "ref/241-\ucffc\ub9ac-\uc218-\uc904\uc774\uae30"
Merged
쿼리 횟수 및 메모리 최적화#242
Conversation
Closed
4 tasks
uykhc
approved these changes
May 5, 2026
uykhc
left a comment
Collaborator
There was a problem hiding this comment.
우선 최적화하시느라 고생하셨습니다!
코드 확인해봤는데
-
이벤트 상세/단건 조회 쪽
findWaitlistPositionsByRegistrationPublicIds 사용 → created_at, registration_public_id
• EventService.kt
• RegistrationService.kt -
내 신청 목록 쪽
findWaitlistPositionsByEventIds 사용 → created_at, id
• 쿼리: RegistrationRepository.kt
• 사용처: RegistrationService.kt
대기순번 산정할 때 정렬 기준 중 tie break 기준이 달라 엔드포인트마다 순번이 다르게 보일 여지가 있는 것 같습니다. registration_public_id는 생성 순서와 무관하니까 id(registration id)로 통일하는 것이 좋아보입니다!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
✨ Feature PR (to dev)
🧪 로컬 테스트 여부 (작업자 체크)
📄 documentation 최신화 여부
📌 작업 내용(what & why)
반복문 혹은 중복 조회로 인한 불필요한 쿼리 횟수를 줄이는 작업과, 메모리에 불필요하게 많은 데이터를 로드하던 부분에서 딱 필요한 만큼만 불러오도록 하는 메모리 최적화를 동시에 진행하였습니다. 쿼리 횟수를 줄여 처리 처리속도가 개선되면 간접적으로 메모리 부하도 줄어들 것으로 기대합니다.
EventService
RegistrationService
🔥 관련 이슈