Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / January 2006

Tip: Looking for answers? Try searching our database.

Hibernate

Thread view: 
mtnguyen@s2i.com - 16 Jan 2006 00:45 GMT
Hi,

We have implemented a webabb that executes around 5000 reads upon
initial load.
We added hibernate to our application for different databases support
(SQLServer, MySQL) this was done
successfully and we are benifiting greatly from Hibernate for about a
year now. However, we now are looking at the
performance overhead that Hibernate adds. We are ready to accept an
overhead for the advantages we have gained but we
initially measured an load time that is 400% of the native sql code.

After some tweaking, we reduced the time to around 200% by setting the
"Auto-Commit" property to true.
We still feel that a 200% increase is too much of a price to pay. We
proceeded to measure more precisely
the native SQL calls versus the Hibernate calls and we have found the
following:
(we are under WinXP, Tomcat, MSSQL, hibernate 3, Microsoft JDBC
drivers, executing simple selects (no inter-entity mapping used for
hibernate))

1. Observing SQL profiler, we see that multiple SQL calls coming from
the native code implementation have the same timestamps while
every sql call coming from the hibernate implementation is "sequential"
(with carying delays of 10-20ms). We have not been able to
identify the reason for this difference in behavior.

2. Adding debug strings before and after the API calls to the database
(native and hibernate), we observe an almost
instantaneous execution of the native call while hibernate calls take
around 16ms. (we use the CreateQuery API). Is this a normal
hibernate parsing overhead?

Can anyone give us their opinions on the performance differences we are
observing?

Questions:

a. Is the transaction manager a factor in our issues ? (We defined
JDBCTansaction in our config file)
b. Is the connection manager a factor in our issues? ( We are using
c3p0)
c. Is this a normal overall performance overhead?

Thanks,
Minh
Oliver Wong - 16 Jan 2006 22:02 GMT
> Hi,
>
[quoted text clipped - 40 lines]
> c3p0)
> c. Is this a normal overall performance overhead?

   This question sounds very specific to Hibernate, and only marginally
related to Java. As such, you'll probably receive better responces in
Hibernate's own forums, which the developers of Hibernate frequently read
and post to.

   Note that they have some rules about "how to ask for help", and they get
upset if you disobey them.

The rules:
http://hibernate.org/160.html

The forum:
http://forum.hibernate.org/

   - Oliver


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.