DEV Community

Cover image for N+1 Selects Problem and how To solve them
Raja Anbazhagan
Raja Anbazhagan

Posted on

N+1 Selects Problem and how To solve them

When retrieving a list of entities from database, if those entities have many-to-one or one-to-many mapping, then it would make separate queries to load those child items.

The obvious way to fix the problem is to use join fetch.

But you can read on the N+1 Selects problem in Hibernate and How to Avoid it with examples for more info.

Top comments (0)