Comparison of DataNucleus 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 | |||
---|---|---|---|---|---|---|
  | DataNucleus Derby server | Hibernate H2 embedded | DataNucleus Derby server | Hibernate H2 embedded | DataNucleus Derby server | Hibernate H2 embedded |
Basic Person Test | 2.8 | 18.1 | 2.3 | 9.0 | 2.6 | 13.5 |
Element Collection Test | 0.71 | 13.0 | 0.35 | 6.8 | 0.53 | 9.9 |
Inheritance Test | 2.7 | 21.0 | 2.0 | 9.4 | 2.3 | 15.2 |
Indexing Test | 4.5 | 29.9 | 4.0 | 18.4 | 4.3 | 24.1 |
Graph (Binary Tree) Test | 0.62 | 17.2 | 0.53 | 20.1 | 0.57 | 18.7 |
Multithreading Test | 4.9 | 36.9 | 3.4 | 11.5 | 4.1 | 24.2 |
All Tests | 2.7 | 22.6 | 2.1 | 12.5 | 2.4 | 17.6 |
The results above show that in general Hibernate with H2 embedded is much more efficient than DataNucleus with Derby server in persisting JPA entity objects to the database. Comparing the normalized speed of DataNucleus with Derby database server (2.4) to the normalized speed of Hibernate with H2 embedded database (17.6) reveals that in these tests, Hibernate with H2 embedded is 7.3 times faster than DataNucleus with Derby server.
A huge performance gap has been detected when using graphs of objects with large transaction size. Comparing the normalized speed of DataNucleus with Derby database server (0.53) to the normalized speed of Hibernate with H2 embedded database (20.1) reveals that in that case, Hibernate with H2 embedded is 37.9 times faster than DataNucleus with Derby server.
Speed comparison of JPA database retrieval operations (normalized score, higher is better)
Retrieval Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | DataNucleus Derby server | Hibernate H2 embedded | DataNucleus Derby server | Hibernate H2 embedded | DataNucleus Derby server | Hibernate H2 embedded |
Basic Person Test | 0.56 | 16.6 | 6.3 | 13.3 | 3.4 | 15.0 |
Element Collection Test | 0.36 | 4.3 | 0.93 | 4.0 | 0.64 | 4.1 |
Inheritance Test | 0.45 | 10.4 | 6.8 | 17.5 | 3.6 | 13.9 |
Indexing Test | 0.50 | 10.8 | 7.1 | 15.2 | 3.8 | 13.0 |
Graph (Binary Tree) Test | 0.22 | 2.5 | 6.6 | 4.0 | 3.4 | 3.3 |
Multithreading Test | 1.2 | 16.2 | 10.0 | 15.7 | 5.6 | 15.9 |
All Tests | 0.55 | 10.1 | 6.3 | 11.6 | 3.4 | 10.9 |
The results above show that in general Hibernate with H2 embedded is much more efficient than DataNucleus with Derby server in retrieving JPA entity objects from the database. Comparing the normalized speed of DataNucleus with Derby database server (3.4) to the normalized speed of Hibernate with H2 embedded database (10.9) reveals that in these tests, Hibernate with H2 embedded is 3.2 times faster than DataNucleus with Derby server.
A huge performance gap has been detected when using simple basic entities with small retrieval size. Comparing the normalized speed of DataNucleus with Derby database server (0.56) to the normalized speed of Hibernate with H2 embedded database (16.6) reveals that in that case, Hibernate with H2 embedded is 29.6 times faster than DataNucleus with Derby server.
Speed comparison of JPA database query operations (normalized score, higher is better)
Retrieval Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | DataNucleus Derby server | Hibernate H2 embedded | DataNucleus Derby server | Hibernate H2 embedded | DataNucleus Derby server | Hibernate H2 embedded |
Basic Person Test | 37.7 | 4.5 | 3.6 | 1.2 | 20.7 | 2.8 |
Element Collection Test | 25.9 | 4.4 | 1.4 | 1.4 | 13.6 | 2.9 |
Inheritance Test | 6.5 | 3.1 | 1.8 | 1.5 | 4.2 | 2.3 |
Indexing Test | 0.030 | 6.6 | 4.9 | 10.5 | 2.5 | 8.6 |
Multithreading Test | failed | 1.2 | failed | 0.59 | failed | 0.89 |
All Tests | 17.5 | 4.0 | 2.9 | 3.0 | 10.2 | 3.5 |
DataNucleus with Derby server has failed in 2 tests (see exceptions).
The results above show that in general DataNucleus with Derby server is 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 DataNucleus with Derby database server (10.2) reveals that in these tests, DataNucleus with Derby server is 2.9 times faster than Hibernate with H2 embedded.
A large performance gap has been detected when using simple basic entities with small retrieval size. Comparing the normalized speed of Hibernate with H2 embedded database (4.5) to the normalized speed of DataNucleus with Derby database server (37.7) reveals that in that case, DataNucleus with Derby server is 8.4 times faster than Hibernate with H2 embedded.
On the other hand, DataNucleus with Derby server is slower, for instance, when using database indexes with small retrieval size. Comparing the normalized speed of DataNucleus with Derby database server (0.030) to the normalized speed of Hibernate with H2 embedded database (6.6) reveals that in that case, DataNucleus with Derby server is 220 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 | |||
---|---|---|---|---|---|---|
  | DataNucleus Derby server | Hibernate H2 embedded | DataNucleus Derby server | Hibernate H2 embedded | DataNucleus Derby server | Hibernate H2 embedded |
Basic Person Test | 1.1 | 12.1 | 0.85 | 6.5 | 0.99 | 9.3 |
Element Collection Test | 0.81 | 7.4 | 0.62 | 5.3 | 0.71 | 6.3 |
Inheritance Test | 1.2 | 10.8 | 1.3 | 8.5 | 1.2 | 9.6 |
Indexing Test | 1.2 | 10.0 | 1.5 | 7.5 | 1.3 | 8.8 |
Graph (Binary Tree) Test | 0.29 | 4.4 | 0.41 | 2.3 | 0.35 | 3.4 |
Multithreading Test | failed | 16.2 | failed | 4.0 | failed | 10.1 |
All Tests | 0.93 | 10.1 | 0.92 | 5.7 | 0.92 | 7.9 |
DataNucleus with Derby server has failed in 2 tests (see exceptions).
The results above show that in general Hibernate with H2 embedded is much more efficient than DataNucleus with Derby server in updating JPA entity objects in the database. Comparing the normalized speed of DataNucleus with Derby database server (0.92) to the normalized speed of Hibernate with H2 embedded database (7.9) reveals that in these tests, Hibernate with H2 embedded is 8.6 times faster than DataNucleus with Derby server.
A huge performance gap has been detected when using graphs of objects with small transaction size. Comparing the normalized speed of DataNucleus with Derby database server (0.29) to the normalized speed of Hibernate with H2 embedded database (4.4) reveals that in that case, Hibernate with H2 embedded is 15.2 times faster than DataNucleus with Derby server.
Speed comparison of JPA database removal operations (normalized score, higher is better)
Transaction Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | DataNucleus Derby server | Hibernate H2 embedded | DataNucleus Derby server | Hibernate H2 embedded | DataNucleus Derby server | Hibernate H2 embedded |
Basic Person Test | 1.3 | 19.7 | 1.3 | 11.4 | 1.3 | 15.5 |
Element Collection Test | 0.61 | 6.9 | 0.33 | 4.5 | 0.47 | 5.7 |
Inheritance Test | 1.0 | 15.6 | 1.3 | 12.9 | 1.2 | 14.2 |
Indexing Test | 2.3 | 23.2 | 1.9 | 12.4 | 2.1 | 17.8 |
Graph (Binary Tree) Test | 0.26 | 4.0 | 0.46 | 4.2 | 0.36 | 4.1 |
Multithreading Test | failed | 27.4 | failed | 22.7 | failed | 25.0 |
All Tests | 1.1 | 16.1 | 1.1 | 11.4 | 1.1 | 13.7 |
DataNucleus with Derby server has failed in 2 tests (see exceptions).
The results above show that in general Hibernate with H2 embedded is much more efficient than DataNucleus with Derby server in deleting JPA entity objects from the database. Comparing the normalized speed of DataNucleus with Derby database server (1.1) to the normalized speed of Hibernate with H2 embedded database (13.7) reveals that in these tests, Hibernate with H2 embedded is 12.5 times faster than DataNucleus with Derby server.
A huge performance gap has been detected when using class inheritance in the object model with small transaction size. Comparing the normalized speed of DataNucleus with Derby database server (1.0) to the normalized speed of Hibernate with H2 embedded database (15.6) reveals that in that case, Hibernate with H2 embedded is 15.6 times faster than DataNucleus with Derby server.
Comparison of JPA/Database speed - the averages (normalized score, higher is better)
Transaction/Retrieval Size | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | DataNucleus Derby server | Hibernate H2 embedded | DataNucleus Derby server | Hibernate H2 embedded | DataNucleus Derby server | Hibernate H2 embedded |
Basic Person Test | 8.7 | 14.2 | 2.9 | 8.3 | 5.8 | 11.2 |
Element Collection Test | 5.7 | 7.2 | 0.72 | 4.4 | 3.2 | 5.8 |
Inheritance Test | 2.4 | 12.2 | 2.6 | 9.9 | 2.5 | 11.0 |
Indexing Test | 1.7 | 16.1 | 3.9 | 12.8 | 2.8 | 14.5 |
Graph (Binary Tree) Test | 0.35 | 7.0 | 2.0 | 7.7 | 1.2 | 7.3 |
Multithreading Test | 3.0 | 19.6 | 6.7 | 10.9 | 4.9 | 15.2 |
All Tests | 3.8 | 12.9 | 2.8 | 9.0 | 3.3 | 11.0 |
The results above show that in general Hibernate with H2 embedded is much more efficient than DataNucleus with Derby server in performing JPA database operations. Comparing the normalized speed of DataNucleus with Derby database server (3.3) to the normalized speed of Hibernate with H2 embedded database (11.0) reveals that in these tests, Hibernate with H2 embedded is 3.3 times faster than DataNucleus with Derby server.
A huge performance gap has been detected when using graphs of objects with small transaction/retrieval size. Comparing the normalized speed of DataNucleus with Derby database server (0.35) to the normalized speed of Hibernate with H2 embedded database (7.0) reveals that in that case, Hibernate with H2 embedded is 20.0 times faster than DataNucleus with Derby server.
Other Head to Head DBMS/JPA Comparisons
DataNucleus 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 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 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