3 Ways to Deal With Hibernate N+1 Problemby@alexandermakeev
57,443 reads
57,443 reads

3 Ways to Deal With Hibernate N+1 Problem

by Alexander Makeev6mJanuary 30th, 2022
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow
EN

Too Long; Didn't Read

Hibernate N+1 issue occurs when you use `FetchType.LAZY` for your entity associations. Hibernate will perform n-additional queries to load lazily fetched objects. To escape this issue use join fetch, batching or sub select.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - 3 Ways to Deal With Hibernate N+1 Problem
Alexander Makeev HackerNoon profile picture
Alexander Makeev

Alexander Makeev

@alexandermakeev

Senior SWE at Layermark

Learn More
LEARN MORE ABOUT @ALEXANDERMAKEEV'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Alexander Makeev HackerNoon profile picture
Alexander Makeev@alexandermakeev
Senior SWE at Layermark

TOPICS

Languages

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite