Comparison of OpenJPA with H2 embedded vs EclipseLink with MySQL 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 H2 embedded | EclipseLink MySQL server | OpenJPA H2 embedded | EclipseLink MySQL server | OpenJPA H2 embedded | EclipseLink MySQL server |
Basic Person Test | 17.1 | 3.6 | 5.8 | 1.5 | 11.5 | 2.6 |
Element Collection Test | 10.9 | 1.5 | 4.9 | 0.69 | 7.9 | 1.1 |
Inheritance Test | 14.3 | 3.5 | 5.9 | 1.4 | 10.1 | 2.4 |
Indexing Test | 24.4 | 5.3 | 13.7 | 2.5 | 19.1 | 3.9 |
Graph (Binary Tree) Test | 6.8 | 1.7 | 6.7 | 1.3 | 6.7 | 1.5 |
Multithreading Test | 34.2 | 7.2 | 10.2 | 2.4 | 22.2 | 4.8 |
All Tests | 17.9 | 3.8 | 7.9 | 1.6 | 12.9 | 2.7 |
The results above show that in general OpenJPA with H2 embedded is much more efficient than EclipseLink with MySQL server in persisting JPA entity objects to the database. Comparing the normalized speed of EclipseLink with MySQL database server (2.7) to the normalized speed of OpenJPA with H2 embedded database (12.9) reveals that in these tests, OpenJPA with H2 embedded is 4.8 times faster than EclipseLink with MySQL server.
A large performance gap has been detected when using JPA element collections with small transaction size. Comparing the normalized speed of EclipseLink with MySQL database server (1.5) to the normalized speed of OpenJPA with H2 embedded database (10.9) reveals that in that case, OpenJPA with H2 embedded is 7.3 times faster than EclipseLink with MySQL server.
Speed comparison of JPA database retrieval operations (normalized score, higher is better)
Retrieval Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | OpenJPA H2 embedded | EclipseLink MySQL server | OpenJPA H2 embedded | EclipseLink MySQL server | OpenJPA H2 embedded | EclipseLink MySQL server |
Basic Person Test | 14.6 | 0.43 | 27.2 | 15.5 | 20.9 | 8.0 |
Element Collection Test | 0.0046 | 0.16 | 4.3 | 1.4 | 2.1 | 0.78 |
Inheritance Test | 0.011 | 0.39 | 7.4 | 17.6 | 3.7 | 9.0 |
Indexing Test | 17.0 | 0.43 | 35.0 | 16.6 | 26.0 | 8.5 |
Graph (Binary Tree) Test | 1.0 | 0.53 | 1.4 | 0.76 | 1.2 | 0.65 |
Multithreading Test | 18.7 | 0.19 | 27.6 | 11.0 | 23.1 | 5.6 |
All Tests | 8.6 | 0.35 | 17.1 | 10.5 | 12.8 | 5.4 |
The results above show that in general OpenJPA with H2 embedded is more efficient than EclipseLink with MySQL server in retrieving JPA entity objects from the database. Comparing the normalized speed of EclipseLink with MySQL database server (5.4) to the normalized speed of OpenJPA with H2 embedded database (12.8) reveals that in these tests, OpenJPA with H2 embedded is 2.4 times faster than EclipseLink with MySQL server.
A huge performance gap has been detected when using multithreading with small retrieval size. Comparing the normalized speed of EclipseLink with MySQL database server (0.19) to the normalized speed of OpenJPA with H2 embedded database (18.7) reveals that in that case, OpenJPA with H2 embedded is 98.4 times faster than EclipseLink with MySQL server.
On the other hand, OpenJPA with H2 embedded is slower, for instance, when using class inheritance in the object model with small retrieval size. Comparing the normalized speed of OpenJPA with H2 embedded database (0.011) to the normalized speed of EclipseLink with MySQL database server (0.39) reveals that in that case, OpenJPA with H2 embedded is 35.5 times slower than EclipseLink with MySQL server.
Speed comparison of JPA database query operations (normalized score, higher is better)
Retrieval Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | OpenJPA H2 embedded | EclipseLink MySQL server | OpenJPA H2 embedded | EclipseLink MySQL server | OpenJPA H2 embedded | EclipseLink MySQL server |
Basic Person Test | 5.0 | 1.5 | 1.1 | 0.44 | 3.1 | 0.95 |
Element Collection Test | 1.7 | 1.4 | 1.3 | 0.43 | 1.5 | 0.92 |
Inheritance Test | 2.2 | 1.1 | 1.2 | 0.61 | 1.7 | 0.86 |
Indexing Test | 13.8 | 0.26 | 23.2 | 0.52 | 18.5 | 0.39 |
Multithreading Test | 1.4 | 1.9 | 0.60 | 0.72 | 0.99 | 1.3 |
All Tests | 4.8 | 1.2 | 5.5 | 0.54 | 5.1 | 0.88 |
The results above show that in general OpenJPA with H2 embedded is much more efficient than EclipseLink with MySQL server in executing the tested JPA queries. Comparing the normalized speed of EclipseLink with MySQL database server (0.88) to the normalized speed of OpenJPA with H2 embedded database (5.1) reveals that in these tests, OpenJPA with H2 embedded is 5.8 times faster than EclipseLink with MySQL server.
A huge performance gap has been detected when using database indexes with small retrieval size. Comparing the normalized speed of EclipseLink with MySQL database server (0.26) to the normalized speed of OpenJPA with H2 embedded database (13.8) reveals that in that case, OpenJPA with H2 embedded is 53.1 times faster than EclipseLink with MySQL server.
Speed comparison of JPA database update operations (normalized score, higher is better)
Transaction Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | OpenJPA H2 embedded | EclipseLink MySQL server | OpenJPA H2 embedded | EclipseLink MySQL server | OpenJPA H2 embedded | EclipseLink MySQL server |
Basic Person Test | 10.0 | 0.39 | 6.0 | 1.8 | 8.0 | 1.1 |
Element Collection Test | 0.011 | 0.23 | 3.8 | 1.4 | 1.9 | 0.83 |
Inheritance Test | 0.046 | 0.42 | 5.0 | 2.6 | 2.5 | 1.5 |
Indexing Test | 8.9 | 0.46 | 7.0 | 3.1 | 8.0 | 1.8 |
Graph (Binary Tree) Test | 2.4 | 0.67 | 1.3 | 0.41 | 1.9 | 0.54 |
Multithreading Test | 16.6 | 0.48 | 4.3 | 2.6 | 10.4 | 1.5 |
All Tests | 6.3 | 0.44 | 4.6 | 2.0 | 5.4 | 1.2 |
The results above show that in general OpenJPA with H2 embedded is much more efficient than EclipseLink with MySQL server in updating JPA entity objects in the database. Comparing the normalized speed of EclipseLink with MySQL database server (1.2) to the normalized speed of OpenJPA with H2 embedded database (5.4) reveals that in these tests, OpenJPA with H2 embedded is 4.5 times faster than EclipseLink with MySQL server.
A huge performance gap has been detected when using multithreading with small transaction size. Comparing the normalized speed of EclipseLink with MySQL database server (0.48) to the normalized speed of OpenJPA with H2 embedded database (16.6) reveals that in that case, OpenJPA with H2 embedded is 34.6 times faster than EclipseLink with MySQL 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 EclipseLink with MySQL database server (0.23) reveals that in that case, OpenJPA with H2 embedded is 20.9 times slower than EclipseLink with MySQL server.
Speed comparison of JPA database removal operations (normalized score, higher is better)
Transaction Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | OpenJPA H2 embedded | EclipseLink MySQL server | OpenJPA H2 embedded | EclipseLink MySQL server | OpenJPA H2 embedded | EclipseLink MySQL server |
Basic Person Test | 18.3 | 0.35 | 11.1 | 1.7 | 14.7 | 1.0 |
Element Collection Test | 0.012 | 0.11 | 2.9 | 0.51 | 1.4 | 0.31 |
Inheritance Test | 0.030 | 0.29 | 6.6 | 1.6 | 3.3 | 0.94 |
Indexing Test | 23.2 | 0.46 | 9.7 | 1.9 | 16.4 | 1.2 |
Graph (Binary Tree) Test | 1.8 | 0.54 | 2.4 | 0.49 | 2.1 | 0.51 |
Multithreading Test | 31.2 | 0.31 | 17.3 | 3.6 | 24.2 | 1.9 |
All Tests | 12.4 | 0.34 | 8.3 | 1.6 | 10.4 | 0.98 |
The results above show that in general OpenJPA with H2 embedded is much more efficient than EclipseLink with MySQL server in deleting JPA entity objects from the database. Comparing the normalized speed of EclipseLink with MySQL database server (0.98) to the normalized speed of OpenJPA with H2 embedded database (10.4) reveals that in these tests, OpenJPA with H2 embedded is 10.6 times faster than EclipseLink with MySQL server.
A huge performance gap has been detected when using multithreading with small transaction size. Comparing the normalized speed of EclipseLink with MySQL database server (0.31) to the normalized speed of OpenJPA with H2 embedded database (31.2) reveals that in that case, OpenJPA with H2 embedded is 101 times faster than EclipseLink with MySQL server.
On the other hand, OpenJPA with H2 embedded is slower, for instance, when using class inheritance in the object model with small transaction size. Comparing the normalized speed of OpenJPA with H2 embedded database (0.030) to the normalized speed of EclipseLink with MySQL database server (0.29) reveals that in that case, OpenJPA with H2 embedded is 9.7 times slower than EclipseLink with MySQL server.
Comparison of JPA/Database speed - the averages (normalized score, higher is better)
Transaction/Retrieval Size | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | OpenJPA H2 embedded | EclipseLink MySQL server | OpenJPA H2 embedded | EclipseLink MySQL server | OpenJPA H2 embedded | EclipseLink MySQL server |
Basic Person Test | 13.0 | 1.3 | 10.2 | 4.2 | 11.6 | 2.7 |
Element Collection Test | 2.5 | 0.69 | 3.4 | 0.89 | 3.0 | 0.79 |
Inheritance Test | 3.3 | 1.1 | 5.2 | 4.8 | 4.3 | 2.9 |
Indexing Test | 17.5 | 1.4 | 17.7 | 4.9 | 17.6 | 3.2 |
Graph (Binary Tree) Test | 3.0 | 0.85 | 3.0 | 0.73 | 3.0 | 0.79 |
Multithreading Test | 20.4 | 2.0 | 12.0 | 4.0 | 16.2 | 3.0 |
All Tests | 10.2 | 1.2 | 8.8 | 3.3 | 9.5 | 2.3 |
The results above show that in general OpenJPA with H2 embedded is much more efficient than EclipseLink with MySQL server in performing JPA database operations. Comparing the normalized speed of EclipseLink with MySQL database server (2.3) to the normalized speed of OpenJPA with H2 embedded database (9.5) reveals that in these tests, OpenJPA with H2 embedded is 4.1 times faster than EclipseLink with MySQL server.
A huge performance gap has been detected when using database indexes with small transaction/retrieval size. Comparing the normalized speed of EclipseLink with MySQL database server (1.4) to the normalized speed of OpenJPA with H2 embedded database (17.5) reveals that in that case, OpenJPA with H2 embedded is 12.5 times faster than EclipseLink with MySQL server.
Other Head to Head DBMS/JPA Comparisons
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
EclipseLink with MySQL 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 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