• +91 9723535972
  • info@interviewmaterial.com

Hibernate Interview Questions and Answers

Question - How to solve N+1 SELECT problem in Hibernate?

Answer -

Some of the strategies followed for solving the N+1 SELECT problem are:

Pre-fetch the records in batches which helps us to reduce the problem of N+1 to (N/K) + 1 where K refers to the size of the batch.
Subselect the fetching strategy
As last resort, try to avoid or disable lazy loading altogether.

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners