-
Notifications
You must be signed in to change notification settings - Fork 1
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
하위 폴더 및 북마크 삭제 완벽히 안됨. #27
Comments
3 번 방법을 채택. 대상노드와 자식노드만 삭제처리 했음.
|
Depth+1 번의 Select 호출로 엔티티 삭제 처리 예정.
|
f3c07c9 해결 |
5, 6번 방법을 섞어서 다시 리팩토링 예정 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
a83d197#r63703508
하위 노드 삭제 방안
1. 삭제로직을 재귀함수로 구현.
2. 해당 폴더의 child들을 저장하는 매핑 테이블을 따로 만든다.
3. 대상노드의 바로 아래 자식노드들만 삭제처리 (추가)
4. 실제 리소스 접근때에 lazy하게 쿼리를 내보낸다. (추가)
5. 큐를 이용한 BFS 구현으로 다음 Depth 로 넘어가기 전까지 같은 레벨의 노드정보를 담아 Select 횟수를 줄인다. (추가)
6. 조인전략으로 테이블을 구성하여 Item -> Folder (OneToOne) , Item -> Bookmark (OneToOne) 으로 구성하면, getItems() Select 1회 호출로 Folder Bookmark 구분 없이 Fetch 가능. (최종)
쿼리문 갯수 비교
대상노드의 자손노드가 N개 일 때
메모리 사용량 비교
대상노드의 자손노드가 N개 일 때
DB 사용량 비교
2번 > 1번
The text was updated successfully, but these errors were encountered: