Alex Rivera | Logout

NHibernate Profiler - large discrepancy between database duration and total duration?

Asked 2011-01-07T16:40:29.303
11

I have an application that makes extensive use of NHibernate. I've started using the NHibernate Profiler to identify possible performance issues. My question is related to the Query Durations statistic.

The stat is broken down in Database Duration and Total Duration. From what I've read, the numbers should be very close. However, I'm seeing relatively large disparities and I'm trying to figure out the source of these. Here's some data

alt text

Any idea on where I can start to fix these issues?

Edit
Report

1 Answer

0

I don't know it for a fact but I always assumed that the Total duration adds all the NHibernate overhead of constructing the SQL query, and upon data retrieval constructing the entities with the raw data.

Perhaps the construction process with your entities is very slow? Do you have some extensive processing in your entities constructors? any IO operations, logging, additional DB access, network usage...

Good luck

answered 2011-01-07T19:28:16.997

Your Answer