Code Explainers

Code explainers tagged #n+1-problem

java
@Controller
public class BookController {
 
    private final BookService bookService;

Solving GraphQL N+1 with batch mapping in Spring

graphql n+1-problem batching
Intermediate 8 steps
java
@Repository
public interface OrderRepository extends JpaRepository<Order, Long> {
 
    @EntityGraph(attributePaths = {"customer", "lineItems", "lineItems.product"})

Killing N+1 queries with @EntityGraph in Spring

orm fetching n+1-problem
Intermediate 5 steps