[22기_서가영] 성능최적화 미션 제출합니다.#61
Open
caminobelllo wants to merge 5 commits intoCEOS-Developers:caminobelllofrom
Open
[22기_서가영] 성능최적화 미션 제출합니다.#61caminobelllo wants to merge 5 commits intoCEOS-Developers:caminobelllofrom
caminobelllo wants to merge 5 commits intoCEOS-Developers:caminobelllofrom
Conversation
danaggero
reviewed
Nov 17, 2025
danaggero
left a comment
There was a problem hiding this comment.
고생 많으셨습니다! db 인덱스에 대해서 잘 정리해주셔서 잘 배웠습니다!
| - 인덱스 커버링 | ||
| - 쿼리가 인덱스에 포함된 컬럼만을 사용하는 경우, 실제 데이터에 접근하지 않고 인덱스에서 결과를 바로 가져올 수 있음 | ||
| ### 단점 | ||
| - 별도 공간, 유지관리 비용 |
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.
성능 최적화 대상
1. SeatQueryService
getSeatMap메서드에서 상영 정보(screening) - 쿼리 1, 상영관의 모든 좌석(seats) - 쿼리 2, 해당 상영의 예매된 좌석(reservedSeat) - 쿼리3 을 조회하고 리턴 시에 Java 메모리를 사용[ 최적화 내용 ]
2. CinemaService.getCinema(Long cinemaId) - N+1 문제
stream().map()실행 시 AuditoriumDto.from()이 상영관 개수(N개)만큼 호출됨[ 최적화 내용 ]
3. ProductOrderQueryService.getOrder
getProduct().getName()호출,getProduct().getPrice()호출 ==> 여기 각각에서 N+1 쿼리 발생)[ 최적화 내용 ]