[#140] Refactor: Batch Delete 성능 개선 리팩토링 #141
Merged
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.
PULL REQUEST
🎋 Branch Name
refactor/#140
🔑 Main Contents
'기존의 JPA deleteAll() 메소드 -> JDBC Batch Delete 메소드'로 리팩토링을 통한 성능 개선 완료.
또한 추가적으로, JPA deleteAllInBatch() 메소드의 테스트까지 하여 성능 차이를 확인함.
(대용량 데이터 10000개 이상이 될 경우, JPA deleteAllInBatch() 메소드는 stackoverflow 에러가 발생함. -> JDBC batch delete 사용.)
🏞 Screenshots (Optional)
📋 Checks for reviewers (Optional)
위의 스크린샷에서 확인할 수 있듯이, 회원탈퇴시 회원이 보유한 UserRoom 일괄 삭제에서 성능의 향상을 보였습니다.
이는 10000명 기준으로 약 1.5배의 성능 개선을 이루어냈습니다.