DevLearn logo
Skill Up With Me
Interactive Learning
Signing in…

Проблема N+1: EntityGraph, FetchType и оптимизация запросов

🔒 Sign in to use this
Проблема N+1: EntityGraph, FetchType и оптимизация запросов

Проблема N+1 запросов — самая распространённая ловушка производительности Hibernate. Она возникает при загрузке списка N сущностей с последующим обращением к лениво загружаемой ассоциации для каждой — запуская N дополнительных SELECT. Загрузка 100 заказов с их позициями выполняет 1 + 100 = 101 запрос вместо 1 или 2.

Content is available with subscription.
Get full access to all courses on the platform for one year with a single payment.
Unlike other platforms that charge per course, here you get everything for one price, and after one year of use there will be no automatic charge for the following year.
🔒 Sign in to use this