Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
3.03
Problem:
I'm trying to introduce hibernate into our already existing application. The goal is to use it for new development and every time we need to rewrite an already existing part. I was asked to do some prototyping on concrete examples form our application.
I have found out that if I use fast running SQL queries (lookup by primary - key no joins) then overhead of hibernate’s code runs 2 time slower than pure JDBC implementation. I know that these are trivial benchmarks and there have been already a lot of discussion about it on this site . However our application is doing millions of such queries per day and I can’t easily sell hibernate and tell that now it will just run twice slower.
To prove that the problem is somewhere in the mapping I tried to create a third implementation - still using hibernate by returning scalar results. It performs as well as simple JDBC.
Do you have any idea what could be done for such trivial queries to reduce mapping overhead?
I have expected that with byte code generation it shouldn't be so bad.
And please don’t forward me to Performance FAQ. I have read it several times. (-: