Comparison of OpenJPA with Derby embedded vs EclipseLink with H2 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 | |||
---|---|---|---|---|---|---|
  | OpenJPA Derby embedded | EclipseLink H2 server | OpenJPA Derby embedded | EclipseLink H2 server | OpenJPA Derby embedded | EclipseLink H2 server |
Basic Person Test | 4.8 | 5.6 | 2.9 | 2.5 | 3.9 | 4.0 |
Element Collection Test | 2.8 | 4.2 | 1.9 | 1.5 | 2.4 | 2.8 |
Inheritance Test | 4.1 | 6.6 | 2.4 | 2.1 | 3.3 | 4.4 |
Indexing Test | 6.1 | 9.7 | 4.1 | 4.1 | 5.1 | 6.9 |
Graph (Binary Tree) Test | 1.5 | 4.7 | 1.4 | 3.5 | 1.4 | 4.1 |
Multithreading Test | 8.7 | 10.2 | 3.3 | 4.0 | 6.0 | 7.1 |
All Tests | 4.7 | 6.8 | 2.7 | 2.9 | 3.7 | 4.9 |
The results above show that in general EclipseLink with H2 server is more efficient than OpenJPA with Derby embedded in persisting JPA entity objects to the database.
A large performance gap has been detected when using graphs of objects with small transaction size. Comparing the normalized speed of OpenJPA with Derby embedded database (1.5) to the normalized speed of EclipseLink with H2 database server (4.7) reveals that in that case, EclipseLink with H2 server is 3.1 times faster than OpenJPA with Derby embedded.
Speed comparison of JPA database retrieval operations (normalized score, higher is better)
Retrieval Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | OpenJPA Derby embedded | EclipseLink H2 server | OpenJPA Derby embedded | EclipseLink H2 server | OpenJPA Derby embedded | EclipseLink H2 server |
Basic Person Test | 14.8 | 5.5 | 22.6 | 8.2 | 18.7 | 6.8 |
Element Collection Test | 0.0031 | 3.2 | 2.3 | 4.2 | 1.2 | 3.7 |
Inheritance Test | 0.015 | 4.7 | 7.0 | 10.1 | 3.5 | 7.4 |
Indexing Test | 11.7 | 4.4 | 26.5 | 9.4 | 19.1 | 6.9 |
Graph (Binary Tree) Test | 0.93 | 1.1 | 1.2 | 1.9 | 1.1 | 1.5 |
Multithreading Test | 25.2 | 12.2 | 28.6 | 15.9 | 26.9 | 14.0 |
All Tests | 8.8 | 5.2 | 14.7 | 8.3 | 11.7 | 6.7 |
The results above show that in general OpenJPA with Derby embedded is more efficient than EclipseLink with H2 server in retrieving JPA entity objects from the database.
A large performance gap has been detected when using database indexes with large retrieval size. Comparing the normalized speed of EclipseLink with H2 database server (9.4) to the normalized speed of OpenJPA with Derby embedded database (26.5) reveals that in that case, OpenJPA with Derby embedded is 2.8 times faster than EclipseLink with H2 server.
On the other hand, OpenJPA with Derby embedded is slower, for instance, when using JPA element collections with small retrieval size. Comparing the normalized speed of OpenJPA with Derby embedded database (0.0031) to the normalized speed of EclipseLink with H2 database server (3.2) reveals that in that case, OpenJPA with Derby embedded is 1,032 times slower than EclipseLink with H2 server.
Speed comparison of JPA database query operations (normalized score, higher is better)
Retrieval Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | OpenJPA Derby embedded | EclipseLink H2 server | OpenJPA Derby embedded | EclipseLink H2 server | OpenJPA Derby embedded | EclipseLink H2 server |
Basic Person Test | 49.7 | 3.8 | 9.9 | 1.1 | 29.8 | 2.5 |
Element Collection Test | 2.7 | 4.1 | 9.6 | 1.1 | 6.1 | 2.6 |
Inheritance Test | 2.3 | 3.2 | 1.3 | 1.3 | 1.8 | 2.3 |
Indexing Test | 7.0 | 3.0 | 17.1 | 8.0 | 12.1 | 5.5 |
Multithreading Test | 40.9 | 1.1 | 11.7 | 1.0 | 26.3 | 1.1 |
All Tests | 20.5 | 3.0 | 9.9 | 2.5 | 15.2 | 2.8 |
The results above show that in general OpenJPA with Derby embedded is much more efficient than EclipseLink with H2 server in executing the tested JPA queries. Comparing the normalized speed of EclipseLink with H2 database server (2.8) to the normalized speed of OpenJPA with Derby embedded database (15.2) reveals that in these tests, OpenJPA with Derby embedded is 5.4 times faster than EclipseLink with H2 server.
A huge performance gap has been detected when using multithreading with small retrieval size. Comparing the normalized speed of EclipseLink with H2 database server (1.1) to the normalized speed of OpenJPA with Derby embedded database (40.9) reveals that in that case, OpenJPA with Derby embedded is 37.2 times faster than EclipseLink with H2 server.
Speed comparison of JPA database update operations (normalized score, higher is better)
Transaction Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | OpenJPA Derby embedded | EclipseLink H2 server | OpenJPA Derby embedded | EclipseLink H2 server | OpenJPA Derby embedded | EclipseLink H2 server |
Basic Person Test | 5.6 | 4.5 | 5.2 | 2.2 | 5.4 | 3.4 |
Element Collection Test | 0.0090 | 3.8 | 2.2 | 2.4 | 1.1 | 3.1 |
Inheritance Test | 0.045 | 4.4 | 4.6 | 3.0 | 2.3 | 3.7 |
Indexing Test | 6.1 | 4.2 | 8.7 | 3.1 | 7.4 | 3.7 |
Graph (Binary Tree) Test | 1.6 | 1.4 | 0.91 | 0.79 | 1.3 | 1.1 |
Multithreading Test | 18.3 | 7.8 | 4.5 | 2.5 | 11.4 | 5.1 |
All Tests | 5.3 | 4.3 | 4.4 | 2.3 | 4.8 | 3.3 |
The results above show that in general OpenJPA with Derby embedded is more efficient than EclipseLink with H2 server in updating JPA entity objects in the database.
A large performance gap has been detected when using database indexes with large transaction size. Comparing the normalized speed of EclipseLink with H2 database server (3.1) to the normalized speed of OpenJPA with Derby embedded database (8.7) reveals that in that case, OpenJPA with Derby embedded is 2.8 times faster than EclipseLink with H2 server.
On the other hand, OpenJPA with Derby embedded is slower, for instance, when using JPA element collections with small transaction size. Comparing the normalized speed of OpenJPA with Derby embedded database (0.0090) to the normalized speed of EclipseLink with H2 database server (3.8) reveals that in that case, OpenJPA with Derby embedded is 422 times slower than EclipseLink with H2 server.
Speed comparison of JPA database removal operations (normalized score, higher is better)
Transaction Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | OpenJPA Derby embedded | EclipseLink H2 server | OpenJPA Derby embedded | EclipseLink H2 server | OpenJPA Derby embedded | EclipseLink H2 server |
Basic Person Test | 4.2 | 6.4 | 4.5 | 3.1 | 4.3 | 4.8 |
Element Collection Test | 0.0071 | 3.0 | 1.6 | 1.3 | 0.80 | 2.2 |
Inheritance Test | 0.035 | 5.6 | 3.0 | 2.8 | 1.5 | 4.2 |
Indexing Test | 5.3 | 10.3 | 3.6 | 3.8 | 4.4 | 7.0 |
Graph (Binary Tree) Test | 0.80 | 1.5 | 0.93 | 1.3 | 0.86 | 1.4 |
Multithreading Test | 5.7 | 7.0 | 6.2 | 4.9 | 6.0 | 6.0 |
All Tests | 2.7 | 5.6 | 3.3 | 2.9 | 3.0 | 4.3 |
The results above show that in general EclipseLink with H2 server is more efficient than OpenJPA with Derby embedded in deleting JPA entity objects from the database.
A huge performance gap has been detected when using JPA element collections with small transaction size. Comparing the normalized speed of OpenJPA with Derby embedded database (0.0071) to the normalized speed of EclipseLink with H2 database server (3.0) reveals that in that case, EclipseLink with H2 server is 423 times faster than OpenJPA with Derby embedded.
Comparison of JPA/Database speed - the averages (normalized score, higher is better)
Transaction/Retrieval Size | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | OpenJPA Derby embedded | EclipseLink H2 server | OpenJPA Derby embedded | EclipseLink H2 server | OpenJPA Derby embedded | EclipseLink H2 server |
Basic Person Test | 15.8 | 5.2 | 9.0 | 3.4 | 12.4 | 4.3 |
Element Collection Test | 1.1 | 3.6 | 3.5 | 2.1 | 2.3 | 2.9 |
Inheritance Test | 1.3 | 4.9 | 3.7 | 3.9 | 2.5 | 4.4 |
Indexing Test | 7.2 | 6.3 | 12.0 | 5.7 | 9.6 | 6.0 |
Graph (Binary Tree) Test | 1.2 | 2.1 | 1.1 | 1.9 | 1.2 | 2.0 |
Multithreading Test | 19.8 | 7.7 | 10.9 | 5.7 | 15.3 | 6.7 |
All Tests | 8.0 | 5.1 | 6.9 | 3.8 | 7.4 | 4.5 |
The results above show that in general OpenJPA with Derby embedded is more efficient than EclipseLink with H2 server in performing JPA database operations.
A large performance gap has been detected when using simple basic entities with small transaction/retrieval size. Comparing the normalized speed of EclipseLink with H2 database server (5.2) to the normalized speed of OpenJPA with Derby embedded database (15.8) reveals that in that case, OpenJPA with Derby embedded is 3.0 times faster than EclipseLink with H2 server.
On the other hand, OpenJPA with Derby embedded is slower, for instance, when using class inheritance in the object model with small transaction/retrieval size. Comparing the normalized speed of OpenJPA with Derby embedded database (1.3) to the normalized speed of EclipseLink with H2 database server (4.9) reveals that in that case, OpenJPA with Derby embedded is 3.8 times slower than EclipseLink with H2 server.
Other Head to Head DBMS/JPA Comparisons
OpenJPA with Derby 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 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 H2 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 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