쿼리
![[프로젝트 기록] fetch-join을 이용해 쿼리 최적화하기](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FTXnv1%2FbtsBojooCGp%2F9n4gALyaJj3oyWKYYFfBk1%2Fimg.png)
[프로젝트 기록] fetch-join을 이용해 쿼리 최적화하기
프로젝트를 진행하면서 쿼리 최적화한 과정을 기록하려고 한다. SpringBoot3.x , JPA를 사용한 프로젝트이다. 🔍 연관관계 기본적으로 JPA를 사용하여 프로젝트를 진행하면 Delete, Update, 맵핑관계가 설정되어 있는 조회 로직에서 쿼리를 확인하고 최적화를 진행하고 있다. 이번에는 일대다 관계를 가진 엔티티를 조회할 때의 쿼리 최적화를 진행하였다. @AllOpen @Entity class Product( @ManyToOne @JoinColumn var category: ProductCategory, ) { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) val id: Long? = null } @Entity class ProductCat..