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

Reply via email to