-->
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: fetch performance
PostPosted: Thu Oct 30, 2008 6:31 am 
Newbie

Joined: Thu Oct 30, 2008 6:06 am
Posts: 1
Hello, all

I´m beggining to use Hibernate in a huge ERP system which has tables with more than 15 mi rows.

We´re currently evaluating Hibernate for use with this system. Our other option is use JDBC directly. The key here is the performance x simplicity of code.

Using Hibernate and HQL is far more simple than JDBC and SQL directly (which must be compatible with at least 3 diferent databases - Oracle, MSSQL and DB2 - in that case, we have some especific SQL commands, then comes the "if (Oracle) blablaal else if (MSSQL) blalblala")).

On our tests, using Hibernate, it takes 13 times more than JDBC directly. We just made a "SELECT * FROM T1", where T1 have 210,000 rows, and fetch all records in a while:

1) JDBC directly: 2.5 secs
2) Hibernate (using objecs - i.e. "from T1"): 85.828 secs
3) Hibernate (using select fields - i.e. "select f1, f2, f3 from T1"): 33.164 secs

The process to create an object and assign all fields to it consumes a lot of time (item 2 above). Load an array of Objects is much more faster, but also very slow, compared to JDBC (item 3 above).

Debugging the execution, we discovered that this time consume is for boxing the primitives that were loaded from database. Is there any way to use the primitives directly?

Or any sugestion to improve this performance?

We really want to use Hibernate, but this performance is really an issue.

Thank you.


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.