Best way to spot bottlenecks in NHibernate?

This refers to the question I mentioned earlier. Besides looking at the SQL generated by NHibernate during database calls, what is the best way to find the bottlenecks between NHibernate and the database? In particular, I have queries that return very quickly when the database starts directly, but very slow (more than 3-4 times) return times when running the code in unit tests and on a web page. I am sure this has something to do with how I matched tables and primary keys. How can I delve further to see where my slow areas occur? Are there other tools? I know this is a very broad question, but I have not yet needed to study these problems. Any help would be greatly appreciated.

+3
source share
3 answers

AFAIK is not a single NHibernate profiling tool. This should change with Ayende NHIbernate Profiler . At the same time, you can use a combination of code profilers (e.g. dotTrace ), SQL Server Profiler, NHibernate logger and static analysis, i.e. if you know about SELECT N + 1, most of the time you can find it just by looking at the code.

EDIT : NHProf is now available!

+1
source

JProbe . , - , . , , .

0

Sql profiler is now used. Later you can BUY Ayende Nhibernate Profiler. Also you can register sql and check.

0
source

All Articles