-
Notifications
You must be signed in to change notification settings - Fork 0
hotfix(single-problem): 인덱스명 중복으로 인한 생성 실패 수정 #268
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
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.
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.
인덱스 이름에 접두사를 붙여 이름 충돌을 해결하신 것은 좋은 수정입니다. 이 기회에 인덱싱 전략을 검토하여 성능을 개선하는 것을 제안합니다.
현재는 여러 컬럼에 대해 개별 인덱스를 생성하고 있습니다. 하지만
SingleProblemQueryService의queryPage를 보면 여러 조건을 조합하여 검색하는 경우가 많을 것으로 예상됩니다. 이 경우 단일 컬럼 인덱스보다 복합 인덱스가 훨씬 효율적일 수 있습니다.예를 들어,
coursePath로 필터링한 후difficulty나accuracy로 추가 필터링하거나 정렬하는 일반적인 사용 사례를 위해 다음과 같은 복합 인덱스를 추가하는 것을 고려해볼 수 있습니다.새로운 복합 인덱스를 추가하면
course_path만으로 검색하는 쿼리에도 해당 인덱스가 사용될 수 있으므로, 기존의idx_singleProblem_coursePath같은 단일 인덱스는 중복으로 간주되어 제거할 수 있습니다. 이를 통해 인덱스 관리 비용을 줄일 수 있습니다.가장 자주 사용되는 쿼리 패턴을 분석하여 최적의 복합 인덱스를 설계하는 것이 장기적인 성능에 도움이 될 것입니다.