CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Threaded View

  1. #1
    Join Date
    Feb 2021
    Location
    India
    Posts
    5

    N+1 SELECT problem in Hibernate

    Hello, Newbie exploring Hibernate. I was wondering if there are any detailed walkaround for the above problem. I found it on the [Link removed] that the below process would give us a solution. Wondering if there are any other solutions!

    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.

    Also, I also checked it in Stackoverflow. Felt it's a bit complicated!

    TIA!!
    Last edited by 2kaud; March 19th, 2021 at 03:18 AM. Reason: Link removed

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured