Ayende @ Rahien

Hi!
My name is Ayende Rahien
Founder of Hibernating Rhinos LTD and RavenDB.
You can reach me by phone or email:

ayende@ayende.com

+972 52-548-6969

@

Posts: 5,947 | Comments: 44,540

filter by tags archive

NHProf new feature: Expensive queries report


It has been a while since we had a new major feature for the profiler, but here it is:

image

The expensive queries report will look at all your queries and surface the most expensive ones across all the sessions. This can give you a good indication on where you need to optimize things.

Naturally, this feature is available across all the profiler profiles (NHibernate Profiler, Entity Framework Profiler, Linq to SQL Profiler and Hibernate Profiler).


Comments

Rafal

What is the definition of expensive query? Long execution time? CPU utilization? IO utilization? Heavy locking?

Also, the total cost of query (TCQ for CIOs) is calculated by multiplying single query cost by number of query executions / unit of time

Ayende Rahien

Expensive means took the longest time.

This is calculated on a single query basis, not across all similar queries.

Gian Maria Ricci

This tend to be a really really nice feature, but I think that query optimization is best done using a profiler in production environment and finding what is happening during real database usage and in real production machine.

Execution time tends to be different from local sql server, or dev machine respect to production one, but surely this is a nice feature to have.

NHProfiler really rocks.

Alk.

Ayende Rahien

Gian,

I agree with you that only on production (or at least QA) you can find the real numbers.

But even on non prod systems, that can give you very strong indications about how things are going

Gian Maria

Yes, you are right, in dev environment we can have indicators, just to find if some queries are really really bad, and then refinement should be made on QA or Production machine.

In my opinion the problem is in the hardware: some devs have machine with 2 gb ram and they test on local sql server, but numbers are really really different when you run the same set of queries on a 2xXeon, 12 GB ram and a bunch of SAS 15k iSCSI disks :).

alk.

Comment preview

Comments have been closed on this topic.

FUTURE POSTS

No future posts left, oh my!

RECENT SERIES

  1. RavenDB Sharding (2):
    21 May 2015 - Adding a new shard to an existing cluster, the easy way
  2. The RavenDB Comic Strip (2):
    20 May 2015 - Part II – a team in trouble!
  3. Challenge (45):
    28 Apr 2015 - What is the meaning of this change?
  4. Interview question (2):
    30 Mar 2015 - fix the index
  5. Excerpts from the RavenDB Performance team report (20):
    20 Feb 2015 - Optimizing Compare – The circle of life (a post-mortem)
View all series

RECENT COMMENTS

Syndication

Main feed Feed Stats
Comments feed   Comments Feed Stats