Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
creamleeminsoo authored Nov 5, 2024
1 parent 8accfe9 commit e92684a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,12 @@

## :scissors: 성능 최적화 및 문제점 해결

저는 N+1문제가 발생할수 있는 상황을 크게 3가지로 나눠 고민해봤습니다.
현 프로젝트의 핵심 페이지인 상품 리스트 페이지에서 성능을 테스트하던 중, 20개의 상품을 조회하는 데 38개의 쿼리가 발생하는 비정상적인 동작을 발견했습니다. 
예상보다 많은 쿼리가 실행되면서 성능 저하를 유발했고,  원인을 조사한 결과 **N+1** 문제가 존재한다는 것을 확인했습니다.

또한 프로젝트 전반에 걸쳐 다수의 연관 관계를 사용하는 만큼, **N+1** 문제는 상품 리스트 페이지뿐만 아니라 모든 페이지에서 해결해야 할 중요한 과제라고 판단했습니다.

저는 **N+1**문제가 발생할수 있는 상황을 크게 3가지로 나눠 고민해봤습니다.

1, 즉시로딩(Eager Loading) 인 상황
2, 지연로딩(Lazy Loading) 인 상황
Expand Down

0 comments on commit e92684a

Please sign in to comment.