Skip to content

Commit

Permalink
Test: N+1 발생 성능 테스트
Browse files Browse the repository at this point in the history
  • Loading branch information
hjinshin committed Nov 14, 2024
1 parent ee84658 commit b07f5df
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import java.util.List;

public interface AnswerRepository extends JpaRepository<Answer, Long> {
@EntityGraph(attributePaths = {"picked"})
//@EntityGraph(attributePaths = {"picked"})
@Query("SELECT p FROM Answer p WHERE p.picked = :user AND p.createdAt BETWEEN :startDate AND :endDate ORDER BY p.createdAt DESC")
Page<Answer> findAllByPickedAndCreatedAtBetween(Pageable pageable, @Param("user") Users user, @Param("startDate") LocalDateTime startDate, @Param("endDate") LocalDateTime endDate);

Expand Down

0 comments on commit b07f5df

Please sign in to comment.