Good suggestion! I was thinking of writing my own interceptor, but I guess an Aspect would work as well. Interceptors being poor man's aspects! I haven't really played much with Aspects, only seen a couple demos, so this might be a good way to get into it. If I make any progress I'll put it on the wiki page.
I was just hoping someone had something all canned that i could use! Eric > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf > Of Thomas > Bentzen > Sent: Tuesday, November 25, 2003 5:38 AM > Cc: [EMAIL PROTECTED] > Subject: Re: [Hibernate] Query Counter Interceptor? > > > Eric Pugh wrote: > > >Hi all, > > > >I am doing some performance tuning on my Hibernate based > app. I noticed > >that a lot of my HQL is quite unoptimized, and requires many > hits to the > >database. So I am using a combination of JunitPerf to > monitor how long a > >unit test takes and the show_sql to look at the number of > SQL statements. > > > >Which makes me wonder, has anyone written an interceptor that counts > >individual queries to the database? Basically I am looking > for something > >that reports back the number of queries by table: > > > >Table # Type > >Customer 10 inserts > >Customer, Workorder 5 selects > >Status, Workorder 15 selects > >Status 5 deletes > > > > > >That way, I could then see if my tunings are helping. I > know the overall > >count of selects isn't the perfect way to measure > performance, but it is a > >good gross indicator of performance. > > > >Eric > > > > > > > > > > > Hi Eric > > You could fairly easy write an aspect to do exctly that. > Thanks to the > nicely written codebase in Hibernate is this pretty > straitforward to do. > > Cheers > Thomas Bentzen > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > Does SourceForge.net help you be more productive? Does it > help you create better code? SHARE THE LOVE, and help us help > YOU! Click Here: http://sourceforge.net/donate/ > _______________________________________________ > hibernate-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel