Comparison of DataNucleus with Derby server vs OpenJPA 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 | OpenJPA H2 embedded | DataNucleus Derby server | OpenJPA H2 embedded | DataNucleus Derby server | OpenJPA H2 embedded |
Basic Person Test | 2.8 | 17.1 | 2.3 | 5.8 | 2.6 | 11.5 |
Element Collection Test | 0.71 | 10.9 | 0.35 | 4.9 | 0.53 | 7.9 |
Inheritance Test | 2.7 | 14.3 | 2.0 | 5.9 | 2.3 | 10.1 |
Indexing Test | 4.5 | 24.4 | 4.0 | 13.7 | 4.3 | 19.1 |
Graph (Binary Tree) Test | 0.62 | 6.8 | 0.53 | 6.7 | 0.57 | 6.7 |
Multithreading Test | 4.9 | 34.2 | 3.4 | 10.2 | 4.1 | 22.2 |
All Tests | 2.7 | 17.9 | 2.1 | 7.9 | 2.4 | 12.9 |
The results above show that in general OpenJPA 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 OpenJPA with H2 embedded database (12.9) reveals that in these tests, OpenJPA with H2 embedded is 5.4 times faster than DataNucleus with Derby server.
A huge performance gap has been detected when using JPA element collections with small transaction size. Comparing the normalized speed of DataNucleus with Derby database server (0.71) to the normalized speed of OpenJPA with H2 embedded database (10.9) reveals that in that case, OpenJPA with H2 embedded is 15.4 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 | OpenJPA H2 embedded | DataNucleus Derby server | OpenJPA H2 embedded | DataNucleus Derby server | OpenJPA H2 embedded |
Basic Person Test | 0.56 | 14.6 | 6.3 | 27.2 | 3.4 | 20.9 |
Element Collection Test | 0.36 | 0.0046 | 0.93 | 4.3 | 0.64 | 2.1 |
Inheritance Test | 0.45 | 0.011 | 6.8 | 7.4 | 3.6 | 3.7 |
Indexing Test | 0.50 | 17.0 | 7.1 | 35.0 | 3.8 | 26.0 |
Graph (Binary Tree) Test | 0.22 | 1.0 | 6.6 | 1.4 | 3.4 | 1.2 |
Multithreading Test | 1.2 | 18.7 | 10.0 | 27.6 | 5.6 | 23.1 |
All Tests | 0.55 | 8.6 | 6.3 | 17.1 | 3.4 | 12.8 |
The results above show that in general OpenJPA 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 OpenJPA with H2 embedded database (12.8) reveals that in these tests, OpenJPA with H2 embedded is 3.8 times faster than DataNucleus with Derby server.
A huge performance gap has been detected when using database indexes with small retrieval size. Comparing the normalized speed of DataNucleus with Derby database server (0.50) to the normalized speed of OpenJPA with H2 embedded database (17.0) reveals that in that case, OpenJPA with H2 embedded is 34.0 times faster than DataNucleus with Derby server.
On the other hand, OpenJPA with H2 embedded is slower, for instance, when using JPA element collections with small retrieval size. Comparing the normalized speed of OpenJPA with H2 embedded database (0.0046) to the normalized speed of DataNucleus with Derby database server (0.36) reveals that in that case, OpenJPA with H2 embedded is 78.3 times slower 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 | OpenJPA H2 embedded | DataNucleus Derby server | OpenJPA H2 embedded | DataNucleus Derby server | OpenJPA H2 embedded |
Basic Person Test | 37.7 | 5.0 | 3.6 | 1.1 | 20.7 | 3.1 |
Element Collection Test | 25.9 | 1.7 | 1.4 | 1.3 | 13.6 | 1.5 |
Inheritance Test | 6.5 | 2.2 | 1.8 | 1.2 | 4.2 | 1.7 |
Indexing Test | 0.030 | 13.8 | 4.9 | 23.2 | 2.5 | 18.5 |
Multithreading Test | failed | 1.4 | failed | 0.60 | failed | 0.99 |
All Tests | 17.5 | 4.8 | 2.9 | 5.5 | 10.2 | 5.1 |
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 OpenJPA with H2 embedded in executing the tested JPA queries. Comparing the normalized speed of OpenJPA with H2 embedded database (5.1) to the normalized speed of DataNucleus with Derby database server (10.2) reveals that in these tests, DataNucleus with Derby server is 2.0 times faster than OpenJPA with H2 embedded.
A huge performance gap has been detected when using JPA element collections with small retrieval size. Comparing the normalized speed of OpenJPA with H2 embedded database (1.7) to the normalized speed of DataNucleus with Derby database server (25.9) reveals that in that case, DataNucleus with Derby server is 15.2 times faster than OpenJPA 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 OpenJPA with H2 embedded database (13.8) reveals that in that case, DataNucleus with Derby server is 460 times slower than OpenJPA 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 | OpenJPA H2 embedded | DataNucleus Derby server | OpenJPA H2 embedded | DataNucleus Derby server | OpenJPA H2 embedded |
Basic Person Test | 1.1 | 10.0 | 0.85 | 6.0 | 0.99 | 8.0 |
Element Collection Test | 0.81 | 0.011 | 0.62 | 3.8 | 0.71 | 1.9 |
Inheritance Test | 1.2 | 0.046 | 1.3 | 5.0 | 1.2 | 2.5 |
Indexing Test | 1.2 | 8.9 | 1.5 | 7.0 | 1.3 | 8.0 |
Graph (Binary Tree) Test | 0.29 | 2.4 | 0.41 | 1.3 | 0.35 | 1.9 |
Multithreading Test | failed | 16.6 | failed | 4.3 | failed | 10.4 |
All Tests | 0.93 | 6.3 | 0.92 | 4.6 | 0.92 | 5.4 |
DataNucleus with Derby server has failed in 2 tests (see exceptions).
The results above show that in general OpenJPA 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 OpenJPA with H2 embedded database (5.4) reveals that in these tests, OpenJPA with H2 embedded is 5.9 times faster than DataNucleus with Derby server.
A large performance gap has been detected when using simple basic entities with small transaction size. Comparing the normalized speed of DataNucleus with Derby database server (1.1) to the normalized speed of OpenJPA with H2 embedded database (10.0) reveals that in that case, OpenJPA with H2 embedded is 9.1 times faster than DataNucleus with Derby server.
On the other hand, OpenJPA with H2 embedded is slower, for instance, when using JPA element collections with small transaction size. Comparing the normalized speed of OpenJPA with H2 embedded database (0.011) to the normalized speed of DataNucleus with Derby database server (0.81) reveals that in that case, OpenJPA with H2 embedded is 73.6 times slower 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 | OpenJPA H2 embedded | DataNucleus Derby server | OpenJPA H2 embedded | DataNucleus Derby server | OpenJPA H2 embedded |
Basic Person Test | 1.3 | 18.3 | 1.3 | 11.1 | 1.3 | 14.7 |
Element Collection Test | 0.61 | 0.012 | 0.33 | 2.9 | 0.47 | 1.4 |
Inheritance Test | 1.0 | 0.030 | 1.3 | 6.6 | 1.2 | 3.3 |
Indexing Test | 2.3 | 23.2 | 1.9 | 9.7 | 2.1 | 16.4 |
Graph (Binary Tree) Test | 0.26 | 1.8 | 0.46 | 2.4 | 0.36 | 2.1 |
Multithreading Test | failed | 31.2 | failed | 17.3 | failed | 24.2 |
All Tests | 1.1 | 12.4 | 1.1 | 8.3 | 1.1 | 10.4 |
DataNucleus with Derby server has failed in 2 tests (see exceptions).
The results above show that in general OpenJPA 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 OpenJPA with H2 embedded database (10.4) reveals that in these tests, OpenJPA with H2 embedded is 9.5 times faster than DataNucleus with Derby server.
A huge performance gap has been detected when using simple basic entities with small transaction size. Comparing the normalized speed of DataNucleus with Derby database server (1.3) to the normalized speed of OpenJPA with H2 embedded database (18.3) reveals that in that case, OpenJPA with H2 embedded is 14.1 times faster than DataNucleus with Derby server.
On the other hand, OpenJPA with H2 embedded is slower, for instance, when using JPA element collections with small transaction size. Comparing the normalized speed of OpenJPA with H2 embedded database (0.012) to the normalized speed of DataNucleus with Derby database server (0.61) reveals that in that case, OpenJPA with H2 embedded is 50.8 times slower 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 | OpenJPA H2 embedded | DataNucleus Derby server | OpenJPA H2 embedded | DataNucleus Derby server | OpenJPA H2 embedded |
Basic Person Test | 8.7 | 13.0 | 2.9 | 10.2 | 5.8 | 11.6 |
Element Collection Test | 5.7 | 2.5 | 0.72 | 3.4 | 3.2 | 3.0 |
Inheritance Test | 2.4 | 3.3 | 2.6 | 5.2 | 2.5 | 4.3 |
Indexing Test | 1.7 | 17.5 | 3.9 | 17.7 | 2.8 | 17.6 |
Graph (Binary Tree) Test | 0.35 | 3.0 | 2.0 | 3.0 | 1.2 | 3.0 |
Multithreading Test | 3.0 | 20.4 | 6.7 | 12.0 | 4.9 | 16.2 |
All Tests | 3.8 | 10.2 | 2.8 | 8.8 | 3.3 | 9.5 |
The results above show that in general OpenJPA with H2 embedded is 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 OpenJPA with H2 embedded database (9.5) reveals that in these tests, OpenJPA with H2 embedded is 2.9 times faster than DataNucleus with Derby server.
A huge performance gap has been detected when using database indexes with small transaction/retrieval size. Comparing the normalized speed of DataNucleus with Derby database server (1.7) to the normalized speed of OpenJPA with H2 embedded database (17.5) reveals that in that case, OpenJPA with H2 embedded is 10.3 times faster than DataNucleus with Derby server.
On the other hand, OpenJPA with H2 embedded is slower, for instance, when using JPA element collections with small transaction/retrieval size. Comparing the normalized speed of OpenJPA with H2 embedded database (2.5) to the normalized speed of DataNucleus with Derby database server (5.7) reveals that in that case, OpenJPA with H2 embedded is 2.3 times slower 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
OpenJPA 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 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 HSQLDB embedded
- OpenJPA with Derby server
- OpenJPA with H2 server
- OpenJPA with MySQL server
- OpenJPA with PostgreSQL server
- ObjectDB embedded
- ObjectDB server