-->
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.  [ 1 post ] 
Author Message
 Post subject: performance question (yes, again!)
PostPosted: Fri Jan 25, 2013 12:16 pm 
Newbie

Joined: Wed Oct 20, 2010 11:22 am
Posts: 14
I know some are real tired of this question - what can I expect for performance.

I have read all the other threads about "you can't judge apples to oranges!". I know that hibernate is an ORM tool and that you have to think of the development time savings rather than the execution time. I know that JDBC should always outperform hibernate.

But, I have read that I should expect decent performance, say 10% - 30% overhead running hibernate. What I found was that it was taking on average about 3x as long.

I wrote a simple program using three methods: JDBC, named query, and native query. The test simple selected 8 columns from a table and put them in a dto (pojo). Thats all. I then ran it against about 500 different records in the DB. There is no concurency, just a simple batch app. These are the results:

JDBC: 410 msecs ( I do run through the resultset and set to dto)
Named Query: 1580 msecs
Native Query: 1430 msecs

I thought I read in some cases that I could expect to get to 30% overhead which would be great in most cases. But 3x will cause me to have to use JDBC in a lot of apps.

Am I doing something wrong? Or is this what I should expect? I was wondering if the problem was due to JDBC PreparedStatment being much faster that the hibernate (is the preparedstatment cached at the DB?).

Thanks


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

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.