Comparison of OpenJPA with HSQLDB embedded vs DataNucleus 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 | |||
---|---|---|---|---|---|---|
  | OpenJPA HSQLDB embedded | DataNucleus H2 embedded | OpenJPA HSQLDB embedded | DataNucleus H2 embedded | OpenJPA HSQLDB embedded | DataNucleus H2 embedded |
Basic Person Test | 13.3 | 19.2 | 6.9 | 8.0 | 10.1 | 13.6 |
Element Collection Test | 8.6 | 6.6 | 5.3 | 2.8 | 7.0 | 4.7 |
Inheritance Test | 12.2 | 15.6 | 5.8 | 4.4 | 9.0 | 10.0 |
Indexing Test | 16.7 | 24.4 | 9.1 | 11.8 | 12.9 | 18.1 |
Graph (Binary Tree) Test | 6.1 | 9.2 | 7.3 | 6.2 | 6.7 | 7.7 |
Multithreading Test | 26.8 | 34.9 | 7.0 | 7.1 | 16.9 | 21.0 |
All Tests | 13.9 | 18.3 | 6.9 | 6.7 | 10.4 | 12.5 |
The results above show that in general DataNucleus with H2 embedded is slightly more efficient than OpenJPA with HSQLDB embedded in persisting JPA entity objects to the database.
Speed comparison of JPA database retrieval operations (normalized score, higher is better)
Retrieval Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | OpenJPA HSQLDB embedded | DataNucleus H2 embedded | OpenJPA HSQLDB embedded | DataNucleus H2 embedded | OpenJPA HSQLDB embedded | DataNucleus H2 embedded |
Basic Person Test | 21.8 | 13.2 | 30.1 | 13.5 | 25.9 | 13.3 |
Element Collection Test | 0.0068 | 6.4 | 4.5 | 8.9 | 2.2 | 7.7 |
Inheritance Test | 0.0025 | 12.2 | 2.0 | 12.7 | 0.98 | 12.4 |
Indexing Test | 22.1 | 8.1 | 43.6 | 16.5 | 32.9 | 12.3 |
Graph (Binary Tree) Test | 2.1 | 10.6 | 2.1 | 20.9 | 2.1 | 15.8 |
Multithreading Test | 20.9 | 13.3 | 23.5 | 9.9 | 22.2 | 11.6 |
All Tests | 11.1 | 10.6 | 17.6 | 13.7 | 14.4 | 12.2 |
The results above show that in general OpenJPA with HSQLDB embedded is slightly more efficient than DataNucleus with H2 embedded in retrieving JPA entity objects from the database.
A large performance gap has been detected when using database indexes with small retrieval size. Comparing the normalized speed of DataNucleus with H2 embedded database (8.1) to the normalized speed of OpenJPA with HSQLDB embedded database (22.1) reveals that in that case, OpenJPA with HSQLDB embedded is 2.7 times faster than DataNucleus with H2 embedded.
On the other hand, OpenJPA with HSQLDB embedded is slower, for instance, when using class inheritance in the object model with small retrieval size. Comparing the normalized speed of OpenJPA with HSQLDB embedded database (0.0025) to the normalized speed of DataNucleus with H2 embedded database (12.2) reveals that in that case, OpenJPA with HSQLDB embedded is 4,880 times slower than DataNucleus with H2 embedded.
Speed comparison of JPA database query operations (normalized score, higher is better)
Retrieval Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | OpenJPA HSQLDB embedded | DataNucleus H2 embedded | OpenJPA HSQLDB embedded | DataNucleus H2 embedded | OpenJPA HSQLDB embedded | DataNucleus H2 embedded |
Basic Person Test | 2.8 | 4.7 | 0.91 | 1.4 | 1.9 | 3.1 |
Element Collection Test | 1.4 | 5.0 | 0.95 | 2.4 | 1.2 | 3.7 |
Inheritance Test | 2.4 | 3.8 | 1.3 | 1.6 | 1.8 | 2.7 |
Indexing Test | 15.4 | 0.0041 | 34.3 | 1.8 | 24.9 | 0.91 |
Multithreading Test | 1.4 | 1.2 | 0.53 | 0.79 | 0.95 | 1.0 |
All Tests | 4.7 | 3.0 | 7.6 | 1.6 | 6.1 | 2.3 |
The results above show that in general OpenJPA with HSQLDB embedded is more efficient than DataNucleus with H2 embedded in executing the tested JPA queries. Comparing the normalized speed of DataNucleus with H2 embedded database (2.3) to the normalized speed of OpenJPA with HSQLDB embedded database (6.1) reveals that in these tests, OpenJPA with HSQLDB embedded is 2.7 times faster than DataNucleus with H2 embedded.
A huge performance gap has been detected when using database indexes with small retrieval size. Comparing the normalized speed of DataNucleus with H2 embedded database (0.0041) to the normalized speed of OpenJPA with HSQLDB embedded database (15.4) reveals that in that case, OpenJPA with HSQLDB embedded is 3,756 times faster than DataNucleus with H2 embedded.
On the other hand, OpenJPA with HSQLDB embedded is slower, for instance, when using JPA element collections with small retrieval size. Comparing the normalized speed of OpenJPA with HSQLDB embedded database (1.4) to the normalized speed of DataNucleus with H2 embedded database (5.0) reveals that in that case, OpenJPA with HSQLDB embedded is 3.6 times slower than DataNucleus with H2 embedded.
Speed comparison of JPA database update operations (normalized score, higher is better)
Transaction Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | OpenJPA HSQLDB embedded | DataNucleus H2 embedded | OpenJPA HSQLDB embedded | DataNucleus H2 embedded | OpenJPA HSQLDB embedded | DataNucleus H2 embedded |
Basic Person Test | 12.0 | 10.0 | 5.3 | 3.9 | 8.6 | 6.9 |
Element Collection Test | 0.017 | 7.6 | 3.7 | 3.9 | 1.8 | 5.8 |
Inheritance Test | 0.0098 | 9.4 | 2.0 | 4.4 | 0.99 | 6.9 |
Indexing Test | 9.3 | 10.6 | 5.5 | 5.9 | 7.4 | 8.2 |
Graph (Binary Tree) Test | 2.5 | 5.9 | 1.6 | 3.7 | 2.1 | 4.8 |
Multithreading Test | 20.0 | failed | 3.7 | failed | 11.8 | failed |
All Tests | 7.3 | 8.7 | 3.6 | 4.4 | 5.5 | 6.5 |
DataNucleus with H2 embedded has failed in 2 tests (see exceptions).
The results above show that in general DataNucleus with H2 embedded is slightly more efficient than OpenJPA with HSQLDB embedded in updating JPA entity objects in the database.
A huge performance gap has been detected when using class inheritance in the object model with small transaction size. Comparing the normalized speed of OpenJPA with HSQLDB embedded database (0.0098) to the normalized speed of DataNucleus with H2 embedded database (9.4) reveals that in that case, DataNucleus with H2 embedded is 959 times faster than OpenJPA with HSQLDB embedded.
Speed comparison of JPA database removal operations (normalized score, higher is better)
Transaction Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | OpenJPA HSQLDB embedded | DataNucleus H2 embedded | OpenJPA HSQLDB embedded | DataNucleus H2 embedded | OpenJPA HSQLDB embedded | DataNucleus H2 embedded |
Basic Person Test | 21.3 | 4.2 | 15.7 | 1.3 | 18.5 | 2.8 |
Element Collection Test | 0.011 | 4.9 | 2.9 | 1.6 | 1.5 | 3.2 |
Inheritance Test | 0.0070 | 4.0 | 3.5 | 1.3 | 1.8 | 2.7 |
Indexing Test | 28.8 | 7.5 | 15.2 | 1.9 | 22.0 | 4.7 |
Graph (Binary Tree) Test | 2.9 | 5.6 | 3.6 | 4.1 | 3.2 | 4.8 |
Multithreading Test | 26.0 | failed | 19.6 | failed | 22.8 | failed |
All Tests | 13.2 | 5.2 | 10.1 | 2.0 | 11.6 | 3.6 |
DataNucleus with H2 embedded has failed in 2 tests (see exceptions).
The results above show that in general OpenJPA with HSQLDB embedded is much more efficient than DataNucleus with H2 embedded in deleting JPA entity objects from the database. Comparing the normalized speed of DataNucleus with H2 embedded database (3.6) to the normalized speed of OpenJPA with HSQLDB embedded database (11.6) reveals that in these tests, OpenJPA with HSQLDB embedded is 3.2 times faster than DataNucleus with H2 embedded.
A huge performance gap has been detected when using simple basic entities with large transaction size. Comparing the normalized speed of DataNucleus with H2 embedded database (1.3) to the normalized speed of OpenJPA with HSQLDB embedded database (15.7) reveals that in that case, OpenJPA with HSQLDB embedded is 12.1 times faster than DataNucleus with H2 embedded.
On the other hand, OpenJPA with HSQLDB embedded is slower, for instance, when using class inheritance in the object model with small transaction size. Comparing the normalized speed of OpenJPA with HSQLDB embedded database (0.0070) to the normalized speed of DataNucleus with H2 embedded database (4.0) reveals that in that case, OpenJPA with HSQLDB embedded is 571 times slower than DataNucleus with H2 embedded.
Comparison of database storage efficiency (normalized score, higher is better)
Transaction Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | OpenJPA HSQLDB embedded | DataNucleus H2 embedded | OpenJPA HSQLDB embedded | DataNucleus H2 embedded | OpenJPA HSQLDB embedded | DataNucleus H2 embedded |
Basic Person Test | 41.4 | 27.0 | 41.4 | 27.0 | 41.4 | 27.0 |
Element Collection Test | 46.9 | 22.4 | 46.9 | 22.4 | 46.9 | 22.4 |
Inheritance Test | 41.4 | 27.0 | 41.4 | 27.0 | 41.4 | 27.0 |
Indexing Test | 48.4 | 31.6 | 49.2 | 32.1 | 48.8 | 31.9 |
Graph (Binary Tree) Test | 28.5 | 20.0 | 21.4 | 15.0 | 25.0 | 17.5 |
Multithreading Test | 51.9 | 33.9 | 10.3 | 9.2 | 31.1 | 21.5 |
All Tests | 43.1 | 27.0 | 35.1 | 22.1 | 39.1 | 24.6 |
The results above show that in general OpenJPA with HSQLDB embedded is more efficient than DataNucleus with H2 embedded in using disk space.
A large gap has been detected when using JPA element collections with small transaction size. Comparing the normalized score of DataNucleus with H2 embedded database (22.4) to the normalized score of OpenJPA with HSQLDB embedded database (46.9) reveals that in that case, OpenJPA with HSQLDB embedded is 2.1 times more efficient than DataNucleus with H2 embedded.
Comparison of JPA/Database speed - the averages (normalized score, higher is better)
Transaction/Retrieval Size | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | OpenJPA HSQLDB embedded | DataNucleus H2 embedded | OpenJPA HSQLDB embedded | DataNucleus H2 embedded | OpenJPA HSQLDB embedded | DataNucleus H2 embedded |
Basic Person Test | 14.3 | 10.3 | 11.8 | 5.6 | 13.0 | 7.9 |
Element Collection Test | 2.0 | 6.1 | 3.5 | 3.9 | 2.7 | 5.0 |
Inheritance Test | 2.9 | 9.0 | 2.9 | 4.9 | 2.9 | 6.9 |
Indexing Test | 18.5 | 10.1 | 21.6 | 7.6 | 20.0 | 8.9 |
Graph (Binary Tree) Test | 3.4 | 7.8 | 3.7 | 8.7 | 3.5 | 8.3 |
Multithreading Test | 19.0 | 16.5 | 10.9 | 5.9 | 14.9 | 11.2 |
All Tests | 10.2 | 9.6 | 9.2 | 6.0 | 9.7 | 7.8 |
The results above show that in general OpenJPA with HSQLDB embedded is slightly more efficient than DataNucleus with H2 embedded in performing JPA database operations.
A large performance gap has been detected when using database indexes with large transaction/retrieval size. Comparing the normalized speed of DataNucleus with H2 embedded database (7.6) to the normalized speed of OpenJPA with HSQLDB embedded database (21.6) reveals that in that case, OpenJPA with HSQLDB embedded is 2.8 times faster than DataNucleus with H2 embedded.
On the other hand, OpenJPA with HSQLDB 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 HSQLDB embedded database (2.9) to the normalized speed of DataNucleus with H2 embedded database (9.0) reveals that in that case, OpenJPA with HSQLDB embedded is 3.1 times slower than DataNucleus with H2 embedded.
Other Head to Head DBMS/JPA Comparisons
OpenJPA 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 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 Derby server
- OpenJPA with H2 server
- OpenJPA with MySQL server
- OpenJPA with PostgreSQL server
- ObjectDB embedded
- ObjectDB server
DataNucleus with H2 embedded against:
- Oracle Database 11g
- IBM DB2 10
- Microsoft SQL Server 2008
- DataNucleus with Derby 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 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