-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 
Author Message
 Post subject: How to count actual database calls and time taken?
PostPosted: Wed Aug 13, 2008 11:53 am 
Newbie

Joined: Wed Aug 13, 2008 11:43 am
Posts: 4
What I need is to count total number of database calls and time taken for its execution for a single web request for my ASP.NET application.

I'm trying to investigate performance problem with my ASP.NET web application. Among other approaches the one I use is adding response processing basic statistics directly into IIS log record (using Reponse.AppendToLog method):
- total time taken between BeginRequest and EndRequest
- (? how ?) total count of database calls
- (? how ?) total database calls time taken

The problem is that cannot figure out a way to count actual database calls and time the take.

Any ideas?

_________________
www.wildapricot.com


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 14, 2008 5:04 am 
Newbie

Joined: Wed Aug 13, 2008 11:43 am
Posts: 4
No ideas? I can't imagine that nobody worries about actual database calls...

_________________
www.wildapricot.com


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 18, 2008 3:15 am 
Newbie

Joined: Wed Aug 13, 2008 11:43 am
Posts: 4
Hey, hibernate gurus...

_________________
www.wildapricot.com


Top
 Profile  
 
 Post subject: Sql Profiler
PostPosted: Thu Aug 21, 2008 8:26 am 
Newbie

Joined: Thu Aug 21, 2008 8:22 am
Posts: 5
if use sql server you can use Sql Server Profiler to trace your queries.

ezaritov wrote:
Hey, hibernate gurus...


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 21, 2008 8:50 am 
Newbie

Joined: Thu Aug 21, 2008 6:20 am
Posts: 3
Yes NHibernate has performance problems. I just wrote in my own thread why and how to solve it: http://forum.hibernate.org/viewtopic.ph ... e38759064b


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 21, 2008 9:43 am 
Newbie

Joined: Wed Aug 13, 2008 11:43 am
Posts: 4
The question was not about SQL profiler or any other methodology of optimizing performance. I know what to do here - there is not question here.

All I asked is a way to log each REAL database call from hibernate to my SQL server and the time it's taken. That is the question. This is the part of my performance analysis strategy (along with all other things).

Actually, I found who to do it - you need to:
1) create your own Driver class (I wrapped standard SqlClientDriver class) 2) override CreateCommand() method in it
3) return your own implementation of IDbCommand class in it (again, just a wrapper around standard SqlCommand)
4) make needed logging around inside methods Execute...() - around calls to SqlCommand methods.

_________________
www.wildapricot.com


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 22, 2008 3:54 am 
Newbie

Joined: Thu Aug 21, 2008 6:20 am
Posts: 3
Quote:
I'm trying to investigate performance problem with my ASP.NET web application.


Did you find a cause other than the fact that GetOrdinal is called on every cell you ever fetch from the Database? I would be interested into what you found out since I also want to improve performance as much as possible :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.