728x90 반응형 LazyCollectionOption.EXTRA1 [Spring Framework] LazyCollectionOption.EXTRA 으로 SQL 최적화 [Spring Boot] N + 1 Query 문제, default_batch_fetch_size로 해결 Question엔티티 구성은 아래와 같다. @Getter @Setter @Entity public class Question { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Integer id; @Column(length = 200) private String subject; @Column(columnDefinition = "TEXT") priva 0live-young.tistory.com 앞에서 배치사이즈를 이용해 최적화를 시켜줬다. 하지만 게시물의 답변 개수를 가져올때 한꺼번에 정보를 가져와서 좋지만, 답변의 id, conten.. 2023. 3. 30. 이전 1 다음 728x90 반응형