Row count in profiler vs. row counts in query results?

144 views
Skip to first unread message

Steve Brown

unread,
Jan 7, 2015, 5:25:20 PM1/7/15
to nhp...@googlegroups.com

I'm trying to understand a discrepancy I'm seeing between the Row Count column in nHibernate Profiler and the actual results returned by the SQL query.  I'm using build 951 (version 1.0.0.0) of the profiler.

I'm using futures to optimize the loading of some complex objects all at once.  Since this is my first go at using futures, I want to make sure I'm doing it correctly.  I've got my queries built and returning the expected results.  While examining the query results in the profiler, I noticed that the Row Count column had unexpected numbers in it, but when I examined the actual query results, SQL is returning exactly what I expect it should be:

So my question is is nHibernate doing something with the results behind the scenes after it gets the proper results from the database that inflates the row count stat?  If so, does this impact the use of nh at all?  Is the counter just wrong (I know I am on an old version of nhprof)?  I've noticed a similar oddity when using futures in a different place in my application.

Or am I just plain wrong and am doing something completely FUBAR'd to generate these types of results? :)

Input is appreicated.

Fitzchak Yitzchaki

unread,
Jan 8, 2015, 3:27:21 AM1/8/15
to nhp...@googlegroups.com
Hello,

Can you send us the File > Save to File to sup...@hibernatingrhinos.com?

I'll verify that this is not an issue with the current version, which is version 3.

Best Regards,

Hibernating Rhinos Ltd  cid:image001.png@01CF95E2.8ED1B7D0

Fitzchak Yitzchaki l Senior Software Engineer Mobile:+972-58-345-9538


--
You received this message because you are subscribed to the Google Groups "nhprof" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nhprof+un...@googlegroups.com.
To post to this group, send email to nhp...@googlegroups.com.
Visit this group at http://groups.google.com/group/nhprof.
For more options, visit https://groups.google.com/d/optout.

Steve Brown

unread,
Jan 8, 2015, 10:07:32 AM1/8/15
to nhp...@googlegroups.com
Can you send us the File > Save to File to --snip--?

Done.  Thanks.

Fitzchak Yitzchaki

unread,
Jan 11, 2015, 9:16:54 AM1/11/15
to nhp...@googlegroups.com
What is the version of NHibernate that you're suing?

This is the info that we got from NHibernate. You are loading 6 objects for the first select statement, and 14 for the second.

Note that object and rows count are different. Since you're using JOIN, it may be that you load the same object a few times (for each row in the JOIN).

In order to understand what is going on in your case, can you give me a full screen shots of the actual results? Now I can see only part of the data.

Also, a way to reproduce your case can help.

Steve Brown

unread,
Jan 12, 2015, 9:28:05 AM1/12/15
to nhp...@googlegroups.com
What is the version of NHibernate that you're suing?

v3.3.1


This is the info that we got from NHibernate. You are loading 6 objects for the first select statement, and 14 for the second.

Yes, that makes sense and is appropriate in my use case.

So I guess my question then becomes: the column labelled "row count" in nhprof is actually a count of the entities generated by the issued SQL command(s).  Is this correct?

If I am interested in rows being returned by SQL in complicated queries, I need to use the query results window?

Fitzchak Yitzchaki

unread,
Jan 12, 2015, 9:50:57 AM1/12/15
to nhp...@googlegroups.com
It depends by the data we get from NHibernate log. 
In your case we didn't get an exact row numbers, so we show this number instead, which in most cases is the same.

If you can provide me with a small case that I can reproduce, we will look if we can improve this scenario.

Best Regards,

Hibernating Rhinos Ltd  cid:image001.png@01CF95E2.8ED1B7D0

Fitzchak Yitzchaki l Senior Software Engineer Mobile:+972-58-345-9538


Reply all
Reply to author
Forward
0 new messages