Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3631286
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T00:22:40+00:00 2026-05-19T00:22:40+00:00

i am using nhibernate profiler and seeing a few places where it is giving

  • 0

i am using nhibernate profiler and seeing a few places where it is giving me a “Select n + 1” warning.

The obvious fix is to make some upfront eager joins but it got me thinking if in certain cases its actually simpler or faster to live with Select N + 1 compared to doing joins that may be load lots of data that you never actually use.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T00:22:41+00:00Added an answer on May 19, 2026 at 12:22 am

    Your thinking is correct. In some cases, for example, all the root entities reference one or two instances of another entity. It might be faster to do 2 or 3 small selects instead of a denormalized one (i.e. with joins)

    There is a way to make this convenient in almost all cases: batch-size. If you set this attribute in both the entities and the collections to your usual page size, you’ll get a constant number of small selects (one per entity type).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In NHibernate Profiler I observed that when I use eager fetching on an association,
I've been developing a webapp using Linq to NHibernate for the past few months,
I am using NHibernate and started using the NHibernate profiler and realized that I
I'm using NHProf with ASP.NET MVC 3. I inserted HibernatingRhinos.Profiler.Appender.NHibernate.NHibernateProfiler.Initialize(); in my Application_Start method,
Using Nhibernate.Search at the moment. Some code for context: [Indexed] class foo { [DocumentId]
I'm using discriminators to deal with item states. I'm using the NHibernate Profiler and
Using NHibernate 1.x we encountered this error, suddently, during a nigthly job: 25/06/2012 22:50:59
Using NHibernate, is it possible to fill an existing object using the results of
Using NHibernate, what is the best way to handle InsertDate (a.k.a CreateDate) and UpdateDate
I am using NHibernate and switched from my local SQLExpress database to Oracle11g. My

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.