[23기_김태익] 성능최적화 미션 제출합니다.#70
Open
taeik21 wants to merge 3 commits into
Open
Conversation
Oh-Jisong
reviewed
May 25, 2026
|
|
||
| --- | ||
|
|
||
| # 성능 최적화 |
There was a problem hiding this comment.
README 정리가 정말 좋았습니다!
단순히 인덱스 추가에서 끝나는 게 아니라 기존 쿼리의 문제와 최적화 후 결과를 같이 보여줘서 성능 개선 의도가 명확하게 전달되는 것 같습니다.
| ```java | ||
| ALTER TABLE movie ADD FULLTEXT INDEX idx_movie_title_ft (title) WITH PARSER ngram; | ||
|
|
||
| @Query(value = "SELECT * FROM movie WHERE MATCH(title) AGAINST(:keyword IN BOOLEAN MODE) AND deleted_at IS NULL", nativeQuery = true) |
There was a problem hiding this comment.
기존 Containing 기반 검색을 Full Text Search로 바꾼 점 좋습니다!
영화 제목 검색은 사용 빈도가 높은 기능이라 단순 JPA 메서드 쿼리보다 실제 DB 검색 방식까지 고려한 점이 성능 최적화 미션 취지에 잘 맞는 것 같습니다.
| @Table(indexes = { | ||
| @Index(name = "idx_theater_location", columnList = "location") | ||
| }) | ||
| public class Theater extends BaseSoftDeleteEntity { |
There was a problem hiding this comment.
지점 검색에서 자주 사용되는 location에 인덱스를 추가한 점 좋습니다!
Theater 조회는 지역 조건으로 필터링되는 경우가 많을 것 같아서 실제 서비스 사용 흐름을 고려한 최적화로 보입니다.
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.
No description provided.