Hibernate Retrieving Efficiency

on Sunday, January 13, 2008

Hibernate as what discussed in most of the forum is not able to handle batch of SQL queries efficiently. This can be proved by the experiments done below:

Testing SQL: SELECT * FROM CORPORATE c where c.STATUS = "ACTIVE".

Return 18K row of data, using normal SQL and setter getter mechanism to populate an entity. It takes 10 seconds

Return 18K row of data, using Hibernate Native SQL and addEntity mechanism. It takes 4 minutes.

Return 18K row of data, using Hibernate HQL. It takes 4 minutes also.

It indicates that it is a wrong concept that using Hibernate Native SQL will help in increasing the efficiency. Furthermore, it also proves that Hibernate did more "hidden" steps when populating an Entity.

Again it proves that Hibernate is not suitable in handling huge transactional data and batch processes.

0 comments: