Comparison of OpenJPA with H2 embedded vs EclipseLink with HSQLDB 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 | |||
---|---|---|---|---|---|---|
  | OpenJPA H2 embedded | EclipseLink HSQLDB embedded | OpenJPA H2 embedded | EclipseLink HSQLDB embedded | OpenJPA H2 embedded | EclipseLink HSQLDB embedded |
Basic Person Test | 17.1 | 27.1 | 5.8 | 17.2 | 11.5 | 22.2 |
Element Collection Test | 10.9 | 17.2 | 4.9 | 8.2 | 7.9 | 12.7 |
Inheritance Test | 14.3 | 26.7 | 5.9 | 11.9 | 10.1 | 19.3 |
Indexing Test | 24.4 | 30.6 | 13.7 | 18.6 | 19.1 | 24.6 |
Graph (Binary Tree) Test | 6.8 | 20.0 | 6.7 | 15.9 | 6.7 | 18.0 |
Multithreading Test | 34.2 | 32.5 | 10.2 | 11.4 | 22.2 | 22.0 |
All Tests | 17.9 | 25.7 | 7.9 | 13.9 | 12.9 | 19.8 |
The results above show that in general EclipseLink with HSQLDB embedded is more efficient than OpenJPA with H2 embedded in persisting JPA entity objects to the database.
A large performance gap has been detected when using simple basic entities with large transaction size. Comparing the normalized speed of OpenJPA with H2 embedded database (5.8) to the normalized speed of EclipseLink with HSQLDB embedded database (17.2) reveals that in that case, EclipseLink with HSQLDB embedded is 3.0 times faster than OpenJPA with H2 embedded.
Speed comparison of JPA database retrieval operations (normalized score, higher is better)
Retrieval Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | OpenJPA H2 embedded | EclipseLink HSQLDB embedded | OpenJPA H2 embedded | EclipseLink HSQLDB embedded | OpenJPA H2 embedded | EclipseLink HSQLDB embedded |
Basic Person Test | 14.6 | 24.4 | 27.2 | 36.0 | 20.9 | 30.2 |
Element Collection Test | 0.0046 | 14.9 | 4.3 | 19.1 | 2.1 | 17.0 |
Inheritance Test | 0.011 | 22.8 | 7.4 | 40.0 | 3.7 | 31.4 |
Indexing Test | 17.0 | 20.7 | 35.0 | 38.7 | 26.0 | 29.7 |
Graph (Binary Tree) Test | 1.0 | 8.7 | 1.4 | 14.2 | 1.2 | 11.4 |
Multithreading Test | 18.7 | 24.2 | 27.6 | 28.0 | 23.1 | 26.1 |
All Tests | 8.6 | 19.3 | 17.1 | 29.3 | 12.8 | 24.3 |
The results above show that in general EclipseLink with HSQLDB embedded is more efficient than OpenJPA with H2 embedded in retrieving JPA entity objects from the database.
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 (0.0046) to the normalized speed of EclipseLink with HSQLDB embedded database (14.9) reveals that in that case, EclipseLink with HSQLDB embedded is 3,239 times faster than OpenJPA with H2 embedded.
Speed comparison of JPA database query operations (normalized score, higher is better)
Retrieval Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | OpenJPA H2 embedded | EclipseLink HSQLDB embedded | OpenJPA H2 embedded | EclipseLink HSQLDB embedded | OpenJPA H2 embedded | EclipseLink HSQLDB embedded |
Basic Person Test | 5.0 | 2.9 | 1.1 | 0.88 | 3.1 | 1.9 |
Element Collection Test | 1.7 | 3.2 | 1.3 | 1.4 | 1.5 | 2.3 |
Inheritance Test | 2.2 | 2.6 | 1.2 | 1.1 | 1.7 | 1.9 |
Indexing Test | 13.8 | 21.5 | 23.2 | 33.3 | 18.5 | 27.4 |
Multithreading Test | 1.4 | 1.1 | 0.60 | 0.52 | 0.99 | 0.82 |
All Tests | 4.8 | 6.3 | 5.5 | 7.4 | 5.1 | 6.9 |
The results above show that in general EclipseLink with HSQLDB embedded is more efficient than OpenJPA with H2 embedded in executing the tested JPA queries.
Speed comparison of JPA database update operations (normalized score, higher is better)
Transaction Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | OpenJPA H2 embedded | EclipseLink HSQLDB embedded | OpenJPA H2 embedded | EclipseLink HSQLDB embedded | OpenJPA H2 embedded | EclipseLink HSQLDB embedded |
Basic Person Test | 10.0 | 17.9 | 6.0 | 7.0 | 8.0 | 12.5 |
Element Collection Test | 0.011 | 14.6 | 3.8 | 8.3 | 1.9 | 11.4 |
Inheritance Test | 0.046 | 16.2 | 5.0 | 9.7 | 2.5 | 13.0 |
Indexing Test | 8.9 | 12.0 | 7.0 | 6.8 | 8.0 | 9.4 |
Graph (Binary Tree) Test | 2.4 | 4.7 | 1.3 | 3.4 | 1.9 | 4.0 |
Multithreading Test | 16.6 | 24.4 | 4.3 | 4.4 | 10.4 | 14.4 |
All Tests | 6.3 | 15.0 | 4.6 | 6.6 | 5.4 | 10.8 |
The results above show that in general EclipseLink with HSQLDB embedded is more efficient than OpenJPA with H2 embedded in updating JPA entity objects in the database. Comparing the normalized speed of OpenJPA with H2 embedded database (5.4) to the normalized speed of EclipseLink with HSQLDB embedded database (10.8) reveals that in these tests, EclipseLink with HSQLDB embedded is 2.0 times faster than OpenJPA with H2 embedded.
A huge performance gap has been detected 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 HSQLDB embedded database (14.6) reveals that in that case, EclipseLink with HSQLDB embedded is 1,327 times faster than OpenJPA with H2 embedded.
Speed comparison of JPA database removal operations (normalized score, higher is better)
Transaction Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | OpenJPA H2 embedded | EclipseLink HSQLDB embedded | OpenJPA H2 embedded | EclipseLink HSQLDB embedded | OpenJPA H2 embedded | EclipseLink HSQLDB embedded |
Basic Person Test | 18.3 | 32.3 | 11.1 | 20.3 | 14.7 | 26.3 |
Element Collection Test | 0.012 | 14.3 | 2.9 | 6.0 | 1.4 | 10.2 |
Inheritance Test | 0.030 | 29.2 | 6.6 | 23.9 | 3.3 | 26.6 |
Indexing Test | 23.2 | 55.3 | 9.7 | 27.1 | 16.4 | 41.2 |
Graph (Binary Tree) Test | 1.8 | 6.8 | 2.4 | 14.1 | 2.1 | 10.4 |
Multithreading Test | 31.2 | 52.9 | 17.3 | 28.4 | 24.2 | 40.6 |
All Tests | 12.4 | 31.8 | 8.3 | 20.0 | 10.4 | 25.9 |
The results above show that in general EclipseLink with HSQLDB embedded is more efficient than OpenJPA with H2 embedded in deleting JPA entity objects from the database. Comparing the normalized speed of OpenJPA with H2 embedded database (10.4) to the normalized speed of EclipseLink with HSQLDB embedded database (25.9) reveals that in these tests, EclipseLink with HSQLDB embedded is 2.5 times faster than OpenJPA with H2 embedded.
A huge performance gap has been detected 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 EclipseLink with HSQLDB embedded database (14.3) reveals that in that case, EclipseLink with HSQLDB embedded is 1,192 times faster than OpenJPA with H2 embedded.
Comparison of database storage efficiency (normalized score, higher is better)
Transaction Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | OpenJPA H2 embedded | EclipseLink HSQLDB embedded | OpenJPA H2 embedded | EclipseLink HSQLDB embedded | OpenJPA H2 embedded | EclipseLink HSQLDB embedded |
Basic Person Test | 27.0 | 41.4 | 27.0 | 41.4 | 27.0 | 41.4 |
Element Collection Test | 30.6 | 46.9 | 30.6 | 46.9 | 30.6 | 46.9 |
Inheritance Test | 27.0 | 41.4 | 27.0 | 41.4 | 27.0 | 41.4 |
Indexing Test | 31.6 | 48.4 | 32.1 | 49.2 | 31.9 | 48.8 |
Graph (Binary Tree) Test | 28.5 | 28.5 | 21.4 | 21.4 | 24.9 | 25.0 |
Multithreading Test | 33.9 | 51.9 | 9.2 | 10.3 | 21.5 | 31.1 |
All Tests | 29.8 | 43.1 | 24.5 | 35.1 | 27.2 | 39.1 |
The results above show that in general EclipseLink with HSQLDB embedded is more efficient than OpenJPA with H2 embedded in using disk space.
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 HSQLDB embedded | OpenJPA H2 embedded | EclipseLink HSQLDB embedded | OpenJPA H2 embedded | EclipseLink HSQLDB embedded |
Basic Person Test | 13.0 | 20.9 | 10.2 | 16.3 | 11.6 | 18.6 |
Element Collection Test | 2.5 | 12.8 | 3.4 | 8.6 | 3.0 | 10.7 |
Inheritance Test | 3.3 | 19.5 | 5.2 | 17.3 | 4.3 | 18.4 |
Indexing Test | 17.5 | 28.0 | 17.7 | 24.9 | 17.6 | 26.5 |
Graph (Binary Tree) Test | 3.0 | 10.0 | 3.0 | 11.9 | 3.0 | 11.0 |
Multithreading Test | 20.4 | 27.0 | 12.0 | 14.6 | 16.2 | 20.8 |
All Tests | 10.2 | 20.1 | 8.8 | 15.7 | 9.5 | 17.9 |
The results above show that in general EclipseLink with HSQLDB embedded is more efficient than OpenJPA with H2 embedded in performing JPA database operations.
A large performance gap has been detected when using class inheritance in the object model with small transaction/retrieval size. Comparing the normalized speed of OpenJPA with H2 embedded database (3.3) to the normalized speed of EclipseLink with HSQLDB embedded database (19.5) reveals that in that case, EclipseLink with HSQLDB embedded is 5.9 times faster than OpenJPA with H2 embedded.
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 HSQLDB 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 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