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.
📝 Description
course table의 courseName, professorName, courseCode에 대해 full text index를 달아보았습니다. 따로 mysql에서 실행해줘야하는 쿼리는 다음과 같습니다.
이후 테스트용으로 만들어둔 2개의 엔드포인트를 postman, datagrip 등으로 실행해서 소요되는 시간을 확인해보면 될 것 같습니다.
✨ To Discuss
사실 개인적인 생각이지만 현재 데이터 개수가 2-3000개 정도로 많지 않아서 인덱싱의 필요성이 그리 크지 않을 것 같긴 합니다. 향후 실제 배포 후 커뮤니티 게시글이 많아졌을 때 커뮤니티 쪽에 적용해보는 것도 좋을 것 같습니다.
🧪 Test
쿼리 실행 시간 유의미하게 줄어드는지 확인해주세요.
🎸 ETC
이 쿼리 2개를 실행해보았을 때
실행 시간이 약간 줄어드는 것은 확인할 수 있었습니다.