Comparison of Hibernate with Derby server vs EclipseLink with PostgreSQL server
Each of the following tables focuses on a specific database operation, where the last table presents average results comparison.
Speed comparison of JPA database persistence operations (normalized score, higher is better)
Transaction Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | Hibernate Derby server | EclipseLink PostgreSQL server | Hibernate Derby server | EclipseLink PostgreSQL server | Hibernate Derby server | EclipseLink PostgreSQL server |
Basic Person Test | 3.8 | 7.3 | 3.0 | 4.2 | 3.4 | 5.8 |
Element Collection Test | 2.0 | 3.1 | 1.3 | 1.9 | 1.7 | 2.5 |
Inheritance Test | 3.4 | 6.9 | 3.0 | 5.0 | 3.2 | 5.9 |
Indexing Test | 4.8 | 10.0 | 4.1 | 6.8 | 4.4 | 8.4 |
Graph (Binary Tree) Test | 1.8 | 3.5 | 1.6 | 3.3 | 1.7 | 3.4 |
Multithreading Test | 6.9 | 31.8 | 3.9 | 14.5 | 5.4 | 23.1 |
All Tests | 3.8 | 10.4 | 2.8 | 6.0 | 3.3 | 8.2 |
The results above show that in general EclipseLink with PostgreSQL server is more efficient than Hibernate with Derby server in persisting JPA entity objects to the database. Comparing the normalized speed of Hibernate with Derby database server (3.3) to the normalized speed of EclipseLink with PostgreSQL database server (8.2) reveals that in these tests, EclipseLink with PostgreSQL server is 2.5 times faster than Hibernate with Derby server.
A large performance gap has been detected when using multithreading with small transaction size. Comparing the normalized speed of Hibernate with Derby database server (6.9) to the normalized speed of EclipseLink with PostgreSQL database server (31.8) reveals that in that case, EclipseLink with PostgreSQL server is 4.6 times faster than Hibernate with Derby server.
Speed comparison of JPA database retrieval operations (normalized score, higher is better)
Retrieval Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | Hibernate Derby server | EclipseLink PostgreSQL server | Hibernate Derby server | EclipseLink PostgreSQL server | Hibernate Derby server | EclipseLink PostgreSQL server |
Basic Person Test | 3.8 | 6.8 | 8.4 | 17.2 | 6.1 | 12.0 |
Element Collection Test | 1.0 | 0.026 | 1.0 | 0.020 | 1.0 | 0.023 |
Inheritance Test | 3.5 | 6.0 | 9.7 | 19.7 | 6.6 | 12.9 |
Indexing Test | 3.2 | 5.6 | 9.5 | 19.5 | 6.4 | 12.6 |
Graph (Binary Tree) Test | 0.91 | 0.47 | 1.2 | 0.61 | 1.1 | 0.54 |
Multithreading Test | 7.8 | 13.5 | 13.4 | 27.8 | 10.6 | 20.6 |
All Tests | 3.4 | 5.4 | 7.2 | 14.1 | 5.3 | 9.8 |
The results above show that in general EclipseLink with PostgreSQL server is more efficient than Hibernate with Derby server in retrieving JPA entity objects from the database.
A large performance gap has been detected when using multithreading with large retrieval size. Comparing the normalized speed of Hibernate with Derby database server (13.4) to the normalized speed of EclipseLink with PostgreSQL database server (27.8) reveals that in that case, EclipseLink with PostgreSQL server is 2.1 times faster than Hibernate with Derby server.
On the other hand, EclipseLink with PostgreSQL server is slower, for instance, when using JPA element collections with large retrieval size. Comparing the normalized speed of EclipseLink with PostgreSQL database server (0.020) to the normalized speed of Hibernate with Derby database server (1.0) reveals that in that case, EclipseLink with PostgreSQL server is 50.0 times slower than Hibernate with Derby server.
Speed comparison of JPA database query operations (normalized score, higher is better)
Retrieval Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | Hibernate Derby server | EclipseLink PostgreSQL server | Hibernate Derby server | EclipseLink PostgreSQL server | Hibernate Derby server | EclipseLink PostgreSQL server |
Basic Person Test | 34.0 | 55.5 | 4.1 | 7.8 | 19.1 | 31.6 |
Element Collection Test | 33.8 | 15.4 | 0.64 | 0.028 | 17.2 | 7.7 |
Inheritance Test | 20.5 | 54.9 | 5.0 | 11.5 | 12.8 | 33.2 |
Indexing Test | 2.0 | 0.077 | 9.2 | 10.0 | 5.6 | 5.1 |
Multithreading Test | 36.2 | 55.3 | 5.1 | 12.0 | 20.6 | 33.7 |
All Tests | 25.3 | 36.2 | 4.8 | 8.3 | 15.1 | 22.3 |
The results above show that in general EclipseLink with PostgreSQL server is more efficient than Hibernate with Derby server in executing the tested JPA queries.
A large performance gap has been detected when using class inheritance in the object model with small retrieval size. Comparing the normalized speed of Hibernate with Derby database server (20.5) to the normalized speed of EclipseLink with PostgreSQL database server (54.9) reveals that in that case, EclipseLink with PostgreSQL server is 2.7 times faster than Hibernate with Derby server.
On the other hand, EclipseLink with PostgreSQL server is slower, for instance, when using database indexes with small retrieval size. Comparing the normalized speed of EclipseLink with PostgreSQL database server (0.077) to the normalized speed of Hibernate with Derby database server (2.0) reveals that in that case, EclipseLink with PostgreSQL server is 26.0 times slower than Hibernate with Derby server.
Speed comparison of JPA database update operations (normalized score, higher is better)
Transaction Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | Hibernate Derby server | EclipseLink PostgreSQL server | Hibernate Derby server | EclipseLink PostgreSQL server | Hibernate Derby server | EclipseLink PostgreSQL server |
Basic Person Test | 2.9 | 6.2 | 2.5 | 4.1 | 2.7 | 5.1 |
Element Collection Test | 2.3 | 0.080 | 1.5 | 0.028 | 1.9 | 0.054 |
Inheritance Test | 2.9 | 6.4 | 3.5 | 6.1 | 3.2 | 6.2 |
Indexing Test | 3.0 | 6.5 | 4.2 | 7.0 | 3.6 | 6.8 |
Graph (Binary Tree) Test | 1.2 | 0.90 | 0.58 | 0.50 | 0.91 | 0.70 |
Multithreading Test | 6.8 | 36.0 | 2.5 | 9.1 | 4.6 | 22.5 |
All Tests | 3.2 | 9.3 | 2.5 | 4.5 | 2.8 | 6.9 |
The results above show that in general EclipseLink with PostgreSQL server is more efficient than Hibernate with Derby server in updating JPA entity objects in the database. Comparing the normalized speed of Hibernate with Derby database server (2.8) to the normalized speed of EclipseLink with PostgreSQL database server (6.9) reveals that in these tests, EclipseLink with PostgreSQL server is 2.5 times faster than Hibernate with Derby server.
A large performance gap has been detected when using multithreading with small transaction size. Comparing the normalized speed of Hibernate with Derby database server (6.8) to the normalized speed of EclipseLink with PostgreSQL database server (36.0) reveals that in that case, EclipseLink with PostgreSQL server is 5.3 times faster than Hibernate with Derby server.
On the other hand, EclipseLink with PostgreSQL server is slower, for instance, when using JPA element collections with large transaction size. Comparing the normalized speed of EclipseLink with PostgreSQL database server (0.028) to the normalized speed of Hibernate with Derby database server (1.5) reveals that in that case, EclipseLink with PostgreSQL server is 53.6 times slower than Hibernate with Derby server.
Speed comparison of JPA database removal operations (normalized score, higher is better)
Transaction Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | Hibernate Derby server | EclipseLink PostgreSQL server | Hibernate Derby server | EclipseLink PostgreSQL server | Hibernate Derby server | EclipseLink PostgreSQL server |
Basic Person Test | 2.9 | 5.7 | 3.5 | 5.7 | 3.2 | 5.7 |
Element Collection Test | 1.7 | 0.025 | 0.87 | stopped | 1.3 | 0.012 |
Inheritance Test | 2.9 | 5.5 | 3.6 | 5.4 | 3.2 | 5.4 |
Indexing Test | 3.7 | 10.4 | 3.6 | 10.0 | 3.7 | 10.2 |
Graph (Binary Tree) Test | 0.69 | 0.016 | 0.70 | 0.013 | 0.70 | 0.015 |
Multithreading Test | 6.2 | 26.3 | 5.1 | 16.8 | 5.6 | 21.6 |
All Tests | 3.0 | 8.0 | 2.9 | 6.3 | 3.0 | 7.2 |
The results above show that in general EclipseLink with PostgreSQL server is more efficient than Hibernate with Derby server in deleting JPA entity objects from the database. Comparing the normalized speed of Hibernate with Derby database server (3.0) to the normalized speed of EclipseLink with PostgreSQL database server (7.2) reveals that in these tests, EclipseLink with PostgreSQL server is 2.4 times faster than Hibernate with Derby server.
A large performance gap has been detected when using multithreading with small transaction size. Comparing the normalized speed of Hibernate with Derby database server (6.2) to the normalized speed of EclipseLink with PostgreSQL database server (26.3) reveals that in that case, EclipseLink with PostgreSQL server is 4.2 times faster than Hibernate with Derby server.
On the other hand, EclipseLink with PostgreSQL server is slower, for instance, when using JPA element collections with small transaction size. Comparing the normalized speed of EclipseLink with PostgreSQL database server (0.025) to the normalized speed of Hibernate with Derby database server (1.7) reveals that in that case, EclipseLink with PostgreSQL server is 68.0 times slower than Hibernate with Derby server.
Comparison of JPA/Database speed - the averages (normalized score, higher is better)
Transaction/Retrieval Size | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | Hibernate Derby server | EclipseLink PostgreSQL server | Hibernate Derby server | EclipseLink PostgreSQL server | Hibernate Derby server | EclipseLink PostgreSQL server |
Basic Person Test | 9.5 | 16.3 | 4.3 | 7.8 | 6.9 | 12.1 |
Element Collection Test | 8.2 | 3.7 | 1.1 | 0.40 | 4.6 | 2.1 |
Inheritance Test | 6.6 | 15.9 | 5.0 | 9.5 | 5.8 | 12.7 |
Indexing Test | 3.3 | 6.5 | 6.1 | 10.7 | 4.7 | 8.6 |
Graph (Binary Tree) Test | 1.2 | 1.2 | 1.0 | 1.1 | 1.1 | 1.2 |
Multithreading Test | 12.8 | 32.6 | 6.0 | 16.0 | 9.4 | 24.3 |
All Tests | 7.1 | 13.1 | 4.0 | 7.8 | 5.6 | 10.5 |
The results above show that in general EclipseLink with PostgreSQL server is more efficient than Hibernate with Derby server in performing JPA database operations.
A large performance gap has been detected when using multithreading with large transaction/retrieval size. Comparing the normalized speed of Hibernate with Derby database server (6.0) to the normalized speed of EclipseLink with PostgreSQL database server (16.0) reveals that in that case, EclipseLink with PostgreSQL server is 2.7 times faster than Hibernate with Derby server.
On the other hand, EclipseLink with PostgreSQL server is slower, for instance, when using JPA element collections with large transaction/retrieval size. Comparing the normalized speed of EclipseLink with PostgreSQL database server (0.40) to the normalized speed of Hibernate with Derby database server (1.1) reveals that in that case, EclipseLink with PostgreSQL server is 2.8 times slower than Hibernate with Derby server.
Other Head to Head DBMS/JPA Comparisons
Hibernate with Derby server against:
- Oracle Database 11g
- IBM DB2 10
- Microsoft SQL Server 2008
- DataNucleus with Derby embedded
- DataNucleus with H2 embedded
- DataNucleus with HSQLDB embedded
- DataNucleus with DB4O embedded
- DataNucleus with Derby server
- DataNucleus with H2 server
- DataNucleus with MySQL server
- DataNucleus with PostgreSQL server
- EclipseLink with Derby embedded
- EclipseLink with H2 embedded
- EclipseLink with HSQLDB embedded
- EclipseLink with SQLite embedded
- EclipseLink with Derby server
- EclipseLink with H2 server
- EclipseLink with MySQL server
- EclipseLink with PostgreSQL server
- Hibernate with Derby embedded
- Hibernate with H2 embedded
- Hibernate with HSQLDB embedded
- Hibernate with SQLite embedded
- Hibernate with H2 server
- Hibernate with MySQL server
- Hibernate with PostgreSQL server
- OpenJPA with Derby embedded
- OpenJPA with H2 embedded
- OpenJPA with HSQLDB embedded
- OpenJPA with Derby server
- OpenJPA with H2 server
- OpenJPA with MySQL server
- OpenJPA with PostgreSQL server
- ObjectDB embedded
- ObjectDB server
EclipseLink with PostgreSQL server against:
- Oracle Database 11g
- IBM DB2 10
- Microsoft SQL Server 2008
- DataNucleus with Derby embedded
- DataNucleus with H2 embedded
- DataNucleus with HSQLDB embedded
- DataNucleus with DB4O embedded
- DataNucleus with Derby server
- DataNucleus with H2 server
- DataNucleus with MySQL server
- DataNucleus with PostgreSQL server
- EclipseLink with Derby embedded
- EclipseLink with H2 embedded
- EclipseLink with HSQLDB embedded
- EclipseLink with SQLite embedded
- EclipseLink with Derby server
- EclipseLink with H2 server
- EclipseLink with MySQL server
- Hibernate with Derby embedded
- Hibernate with H2 embedded
- Hibernate with HSQLDB embedded
- Hibernate with SQLite embedded
- Hibernate with Derby server
- Hibernate with H2 server
- Hibernate with MySQL server
- Hibernate with PostgreSQL server
- OpenJPA with Derby embedded
- OpenJPA with H2 embedded
- OpenJPA with HSQLDB embedded
- OpenJPA with Derby server
- OpenJPA with H2 server
- OpenJPA with MySQL server
- OpenJPA with PostgreSQL server
- ObjectDB embedded
- ObjectDB server