Comparison of EclipseLink with Derby server vs Hibernate with H2 embedded
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 | |||
---|---|---|---|---|---|---|
  | EclipseLink Derby server | Hibernate H2 embedded | EclipseLink Derby server | Hibernate H2 embedded | EclipseLink Derby server | Hibernate H2 embedded |
Basic Person Test | 3.8 | 18.1 | 3.1 | 9.0 | 3.4 | 13.5 |
Element Collection Test | 2.2 | 13.0 | 1.5 | 6.8 | 1.8 | 9.9 |
Inheritance Test | 3.9 | 21.0 | 2.9 | 9.4 | 3.4 | 15.2 |
Indexing Test | 5.2 | 29.9 | 4.3 | 18.4 | 4.7 | 24.1 |
Graph (Binary Tree) Test | 1.9 | 17.2 | 1.7 | 20.1 | 1.8 | 18.7 |
Multithreading Test | 6.1 | 36.9 | 3.9 | 11.5 | 5.0 | 24.2 |
All Tests | 3.8 | 22.6 | 2.9 | 12.5 | 3.4 | 17.6 |
The results above show that in general Hibernate with H2 embedded is much more efficient than EclipseLink with Derby server in persisting JPA entity objects to the database. Comparing the normalized speed of EclipseLink with Derby database server (3.4) to the normalized speed of Hibernate with H2 embedded database (17.6) reveals that in these tests, Hibernate with H2 embedded is 5.2 times faster than EclipseLink with Derby server.
A huge performance gap has been detected when using graphs of objects with large transaction size. Comparing the normalized speed of EclipseLink with Derby database server (1.7) to the normalized speed of Hibernate with H2 embedded database (20.1) reveals that in that case, Hibernate with H2 embedded is 11.8 times faster than EclipseLink with Derby server.
Speed comparison of JPA database retrieval operations (normalized score, higher is better)
Retrieval Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | EclipseLink Derby server | Hibernate H2 embedded | EclipseLink Derby server | Hibernate H2 embedded | EclipseLink Derby server | Hibernate H2 embedded |
Basic Person Test | 6.4 | 16.6 | 11.3 | 13.3 | 8.8 | 15.0 |
Element Collection Test | 1.8 | 4.3 | 2.4 | 4.0 | 2.1 | 4.1 |
Inheritance Test | 3.7 | 10.4 | 12.9 | 17.5 | 8.3 | 13.9 |
Indexing Test | 3.6 | 10.8 | 12.8 | 15.2 | 8.2 | 13.0 |
Graph (Binary Tree) Test | 0.61 | 2.5 | 0.73 | 4.0 | 0.67 | 3.3 |
Multithreading Test | 8.5 | 16.2 | 19.8 | 15.7 | 14.1 | 15.9 |
All Tests | 4.1 | 10.1 | 10.0 | 11.6 | 7.0 | 10.9 |
The results above show that in general Hibernate with H2 embedded is more efficient than EclipseLink with Derby server in retrieving JPA entity objects from the database.
A large performance gap has been detected when using graphs of objects with large retrieval size. Comparing the normalized speed of EclipseLink with Derby database server (0.73) to the normalized speed of Hibernate with H2 embedded database (4.0) reveals that in that case, Hibernate with H2 embedded is 5.5 times faster than EclipseLink with Derby server.
Speed comparison of JPA database query operations (normalized score, higher is better)
Retrieval Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | EclipseLink Derby server | Hibernate H2 embedded | EclipseLink Derby server | Hibernate H2 embedded | EclipseLink Derby server | Hibernate H2 embedded |
Basic Person Test | 45.8 | 4.5 | 5.3 | 1.2 | 25.6 | 2.8 |
Element Collection Test | 35.2 | 4.4 | 0.99 | 1.4 | 18.1 | 2.9 |
Inheritance Test | 23.1 | 3.1 | 5.9 | 1.5 | 14.5 | 2.3 |
Indexing Test | 2.5 | 6.6 | 12.2 | 10.5 | 7.4 | 8.6 |
Multithreading Test | 34.3 | 1.2 | 7.7 | 0.59 | 21.0 | 0.89 |
All Tests | 28.2 | 4.0 | 6.4 | 3.0 | 17.3 | 3.5 |
The results above show that in general EclipseLink with Derby server is much more efficient than Hibernate with H2 embedded in executing the tested JPA queries. Comparing the normalized speed of Hibernate with H2 embedded database (3.5) to the normalized speed of EclipseLink with Derby database server (17.3) reveals that in these tests, EclipseLink with Derby server is 4.9 times faster than Hibernate with H2 embedded.
A huge performance gap has been detected when using multithreading with small retrieval size. Comparing the normalized speed of Hibernate with H2 embedded database (1.2) to the normalized speed of EclipseLink with Derby database server (34.3) reveals that in that case, EclipseLink with Derby server is 28.6 times faster than Hibernate with H2 embedded.
On the other hand, EclipseLink with Derby server is slower, for instance, when using database indexes with small retrieval size. Comparing the normalized speed of EclipseLink with Derby database server (2.5) to the normalized speed of Hibernate with H2 embedded database (6.6) reveals that in that case, EclipseLink with Derby server is 2.6 times slower than Hibernate with H2 embedded.
Speed comparison of JPA database update operations (normalized score, higher is better)
Transaction Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | EclipseLink Derby server | Hibernate H2 embedded | EclipseLink Derby server | Hibernate H2 embedded | EclipseLink Derby server | Hibernate H2 embedded |
Basic Person Test | 3.9 | 12.1 | 4.4 | 6.5 | 4.1 | 9.3 |
Element Collection Test | 1.7 | 7.4 | 1.6 | 5.3 | 1.6 | 6.3 |
Inheritance Test | 4.6 | 10.8 | 6.1 | 8.5 | 5.3 | 9.6 |
Indexing Test | 4.5 | 10.0 | 7.6 | 7.5 | 6.1 | 8.8 |
Graph (Binary Tree) Test | 0.70 | 4.4 | 0.42 | 2.3 | 0.56 | 3.4 |
Multithreading Test | 7.3 | 16.2 | 4.8 | 4.0 | 6.0 | 10.1 |
All Tests | 3.8 | 10.1 | 4.2 | 5.7 | 4.0 | 7.9 |
The results above show that in general Hibernate with H2 embedded is more efficient than EclipseLink with Derby server in updating JPA entity objects in the database.
A large performance gap has been detected when using graphs of objects with small transaction size. Comparing the normalized speed of EclipseLink with Derby database server (0.70) to the normalized speed of Hibernate with H2 embedded database (4.4) reveals that in that case, Hibernate with H2 embedded is 6.3 times faster than EclipseLink with Derby server.
Speed comparison of JPA database removal operations (normalized score, higher is better)
Transaction Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | EclipseLink Derby server | Hibernate H2 embedded | EclipseLink Derby server | Hibernate H2 embedded | EclipseLink Derby server | Hibernate H2 embedded |
Basic Person Test | 2.8 | 19.7 | 3.9 | 11.4 | 3.3 | 15.5 |
Element Collection Test | 1.2 | 6.9 | 0.55 | 4.5 | 0.87 | 5.7 |
Inheritance Test | 3.3 | 15.6 | 3.7 | 12.9 | 3.5 | 14.2 |
Indexing Test | 4.9 | 23.2 | 3.5 | 12.4 | 4.2 | 17.8 |
Graph (Binary Tree) Test | 0.51 | 4.0 | 0.50 | 4.2 | 0.51 | 4.1 |
Multithreading Test | 4.8 | 27.4 | 5.7 | 22.7 | 5.3 | 25.0 |
All Tests | 2.9 | 16.1 | 3.0 | 11.4 | 3.0 | 13.7 |
The results above show that in general Hibernate with H2 embedded is much more efficient than EclipseLink with Derby server in deleting JPA entity objects from the database. Comparing the normalized speed of EclipseLink with Derby database server (3.0) to the normalized speed of Hibernate with H2 embedded database (13.7) reveals that in these tests, Hibernate with H2 embedded is 4.6 times faster than EclipseLink with Derby server.
A large performance gap has been detected when using graphs of objects with large transaction size. Comparing the normalized speed of EclipseLink with Derby database server (0.50) to the normalized speed of Hibernate with H2 embedded database (4.2) reveals that in that case, Hibernate with H2 embedded is 8.4 times faster than EclipseLink with Derby server.
Comparison of JPA/Database speed - the averages (normalized score, higher is better)
Transaction/Retrieval Size | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | EclipseLink Derby server | Hibernate H2 embedded | EclipseLink Derby server | Hibernate H2 embedded | EclipseLink Derby server | Hibernate H2 embedded |
Basic Person Test | 12.5 | 14.2 | 5.6 | 8.3 | 9.1 | 11.2 |
Element Collection Test | 8.4 | 7.2 | 1.4 | 4.4 | 4.9 | 5.8 |
Inheritance Test | 7.7 | 12.2 | 6.3 | 9.9 | 7.0 | 11.0 |
Indexing Test | 4.1 | 16.1 | 8.1 | 12.8 | 6.1 | 14.5 |
Graph (Binary Tree) Test | 0.93 | 7.0 | 0.83 | 7.7 | 0.88 | 7.3 |
Multithreading Test | 12.2 | 19.6 | 8.4 | 10.9 | 10.3 | 15.2 |
All Tests | 7.9 | 12.9 | 5.2 | 9.0 | 6.6 | 11.0 |
The results above show that in general Hibernate with H2 embedded is more efficient than EclipseLink with Derby server in performing JPA database operations.
A large performance gap has been detected when using graphs of objects with large transaction/retrieval size. Comparing the normalized speed of EclipseLink with Derby database server (0.83) to the normalized speed of Hibernate with H2 embedded database (7.7) reveals that in that case, Hibernate with H2 embedded is 9.3 times faster than EclipseLink with Derby server.
Other Head to Head DBMS/JPA Comparisons
EclipseLink 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 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 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
Hibernate with H2 embedded 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 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