Comparison of OpenJPA with HSQLDB embedded vs OpenJPA with PostgreSQL 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 HSQLDB embedded | OpenJPA PostgreSQL server | OpenJPA HSQLDB embedded | OpenJPA PostgreSQL server | OpenJPA HSQLDB embedded | OpenJPA PostgreSQL server |
Basic Person Test | 13.3 | 5.2 | 6.9 | 4.8 | 10.1 | 5.0 |
Element Collection Test | 8.6 | 2.8 | 5.3 | 2.2 | 7.0 | 2.5 |
Inheritance Test | 12.2 | 4.6 | 5.8 | 3.2 | 9.0 | 3.9 |
Indexing Test | 16.7 | 7.4 | 9.1 | 6.9 | 12.9 | 7.1 |
Graph (Binary Tree) Test | 6.1 | 0.98 | 7.3 | 0.81 | 6.7 | 0.89 |
Multithreading Test | 26.8 | 23.4 | 7.0 | 9.1 | 16.9 | 16.2 |
All Tests | 13.9 | 7.4 | 6.9 | 4.5 | 10.4 | 5.9 |
The results above show that in general OpenJPA with HSQLDB embedded is more efficient than OpenJPA with PostgreSQL server in persisting JPA entity objects to the database.
A large performance gap has been detected when using graphs of objects with large transaction size. Comparing the normalized speed of OpenJPA with PostgreSQL database server (0.81) to the normalized speed of OpenJPA with HSQLDB embedded database (7.3) reveals that in that case, OpenJPA with HSQLDB embedded is 9.0 times faster than OpenJPA with PostgreSQL server.
Speed comparison of JPA database retrieval operations (normalized score, higher is better)
Retrieval Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | OpenJPA HSQLDB embedded | OpenJPA PostgreSQL server | OpenJPA HSQLDB embedded | OpenJPA PostgreSQL server | OpenJPA HSQLDB embedded | OpenJPA PostgreSQL server |
Basic Person Test | 21.8 | 5.8 | 30.1 | 16.1 | 25.9 | 10.9 |
Element Collection Test | 0.0068 | 0.013 | 4.5 | 8.7 | 2.2 | 4.4 |
Inheritance Test | 0.0025 | 5.2 | 2.0 | 17.6 | 0.98 | 11.4 |
Indexing Test | 22.1 | 4.8 | 43.6 | 18.7 | 32.9 | 11.8 |
Graph (Binary Tree) Test | 2.1 | 0.27 | 2.1 | 0.35 | 2.1 | 0.31 |
Multithreading Test | 20.9 | 11.9 | 23.5 | 23.3 | 22.2 | 17.6 |
All Tests | 11.1 | 4.7 | 17.6 | 14.1 | 14.4 | 9.4 |
The results above show that in general OpenJPA with HSQLDB embedded is more efficient than OpenJPA with PostgreSQL server in retrieving JPA entity objects from the database.
A large performance gap has been detected when using graphs of objects with small retrieval size. Comparing the normalized speed of OpenJPA with PostgreSQL database server (0.27) to the normalized speed of OpenJPA with HSQLDB embedded database (2.1) reveals that in that case, OpenJPA with HSQLDB embedded is 7.8 times faster than OpenJPA with PostgreSQL server.
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 OpenJPA with PostgreSQL database server (5.2) reveals that in that case, OpenJPA with HSQLDB embedded is 2,080 times slower than OpenJPA with PostgreSQL server.
Speed comparison of JPA database query operations (normalized score, higher is better)
Retrieval Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | OpenJPA HSQLDB embedded | OpenJPA PostgreSQL server | OpenJPA HSQLDB embedded | OpenJPA PostgreSQL server | OpenJPA HSQLDB embedded | OpenJPA PostgreSQL server |
Basic Person Test | 2.8 | failed | 0.91 | failed | 1.9 | failed |
Element Collection Test | 1.4 | failed | 0.95 | failed | 1.2 | failed |
Inheritance Test | 2.4 | failed | 1.3 | failed | 1.8 | failed |
Indexing Test | 15.4 | failed | 34.3 | failed | 24.9 | failed |
Multithreading Test | 1.4 | failed | 0.53 | failed | 0.95 | failed |
All Tests | 4.7 | failed | 7.6 | failed | 6.1 | failed |
OpenJPA with PostgreSQL server has failed in 10 tests (see exceptions).
Speed comparison of JPA database update operations (normalized score, higher is better)
Transaction Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | OpenJPA HSQLDB embedded | OpenJPA PostgreSQL server | OpenJPA HSQLDB embedded | OpenJPA PostgreSQL server | OpenJPA HSQLDB embedded | OpenJPA PostgreSQL server |
Basic Person Test | 12.0 | 4.9 | 5.3 | 3.9 | 8.6 | 4.4 |
Element Collection Test | 0.017 | 0.033 | 3.7 | 4.6 | 1.8 | 2.3 |
Inheritance Test | 0.0098 | 4.8 | 2.0 | 4.9 | 0.99 | 4.9 |
Indexing Test | 9.3 | 5.1 | 5.5 | 6.0 | 7.4 | 5.6 |
Graph (Binary Tree) Test | 2.5 | 0.57 | 1.6 | 0.31 | 2.1 | 0.44 |
Multithreading Test | 20.0 | 22.2 | 3.7 | 7.4 | 11.8 | 14.8 |
All Tests | 7.3 | 6.3 | 3.6 | 4.5 | 5.5 | 5.4 |
The results above show that in general OpenJPA with HSQLDB embedded is slightly more efficient than OpenJPA with PostgreSQL server in updating JPA entity objects in the database.
A large performance gap has been detected when using graphs of objects with large transaction size. Comparing the normalized speed of OpenJPA with PostgreSQL database server (0.31) to the normalized speed of OpenJPA with HSQLDB embedded database (1.6) reveals that in that case, OpenJPA with HSQLDB embedded is 5.2 times faster than OpenJPA with PostgreSQL server.
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.0098) to the normalized speed of OpenJPA with PostgreSQL database server (4.8) reveals that in that case, OpenJPA with HSQLDB embedded is 490 times slower than OpenJPA with PostgreSQL server.
Speed comparison of JPA database removal operations (normalized score, higher is better)
Transaction Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | OpenJPA HSQLDB embedded | OpenJPA PostgreSQL server | OpenJPA HSQLDB embedded | OpenJPA PostgreSQL server | OpenJPA HSQLDB embedded | OpenJPA PostgreSQL server |
Basic Person Test | 21.3 | 4.6 | 15.7 | 5.3 | 18.5 | 5.0 |
Element Collection Test | 0.011 | 0.032 | 2.9 | 2.8 | 1.5 | 1.4 |
Inheritance Test | 0.0070 | 4.3 | 3.5 | 4.6 | 1.8 | 4.4 |
Indexing Test | 28.8 | 8.0 | 15.2 | 7.1 | 22.0 | 7.5 |
Graph (Binary Tree) Test | 2.9 | 0.53 | 3.6 | 0.55 | 3.2 | 0.54 |
Multithreading Test | 26.0 | 17.4 | 19.6 | 9.1 | 22.8 | 13.3 |
All Tests | 13.2 | 5.8 | 10.1 | 4.9 | 11.6 | 5.4 |
The results above show that in general OpenJPA with HSQLDB embedded is more efficient than OpenJPA with PostgreSQL server in deleting JPA entity objects from the database. Comparing the normalized speed of OpenJPA with PostgreSQL database server (5.4) to the normalized speed of OpenJPA with HSQLDB embedded database (11.6) reveals that in these tests, OpenJPA with HSQLDB embedded is 2.1 times faster than OpenJPA with PostgreSQL server.
A large performance gap has been detected when using graphs of objects with large transaction size. Comparing the normalized speed of OpenJPA with PostgreSQL database server (0.55) to the normalized speed of OpenJPA with HSQLDB embedded database (3.6) reveals that in that case, OpenJPA with HSQLDB embedded is 6.5 times faster than OpenJPA with PostgreSQL server.
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 OpenJPA with PostgreSQL database server (4.3) reveals that in that case, OpenJPA with HSQLDB embedded is 614 times slower than OpenJPA with PostgreSQL server.
Comparison of JPA/Database speed - the averages (normalized score, higher is better)
Transaction/Retrieval Size | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | OpenJPA HSQLDB embedded | OpenJPA PostgreSQL server | OpenJPA HSQLDB embedded | OpenJPA PostgreSQL server | OpenJPA HSQLDB embedded | OpenJPA PostgreSQL server |
Basic Person Test | 14.3 | 5.1 | 11.8 | 7.5 | 13.0 | 6.3 |
Element Collection Test | 2.0 | 0.72 | 3.5 | 4.6 | 2.7 | 2.6 |
Inheritance Test | 2.9 | 4.7 | 2.9 | 7.6 | 2.9 | 6.2 |
Indexing Test | 18.5 | 6.3 | 21.6 | 9.7 | 20.0 | 8.0 |
Graph (Binary Tree) Test | 3.4 | 0.59 | 3.7 | 0.50 | 3.5 | 0.55 |
Multithreading Test | 19.0 | 18.7 | 10.9 | 12.2 | 14.9 | 15.5 |
All Tests | 10.2 | 6.0 | 9.2 | 7.0 | 9.7 | 6.5 |
The results above show that in general OpenJPA with HSQLDB embedded is more efficient than OpenJPA with PostgreSQL server in performing JPA database operations.
A large performance gap has been detected when using graphs of objects with large transaction/retrieval size. Comparing the normalized speed of OpenJPA with PostgreSQL database server (0.50) to the normalized speed of OpenJPA with HSQLDB embedded database (3.7) reveals that in that case, OpenJPA with HSQLDB embedded is 7.4 times faster than OpenJPA with PostgreSQL server.
On the other hand, OpenJPA with HSQLDB embedded is slower, for instance, when using class inheritance in the object model with large transaction/retrieval size. Comparing the normalized speed of OpenJPA with HSQLDB embedded database (2.9) to the normalized speed of OpenJPA with PostgreSQL database server (7.6) reveals that in that case, OpenJPA with HSQLDB embedded is 2.6 times slower than OpenJPA with PostgreSQL server.
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
OpenJPA with PostgreSQL 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 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
- ObjectDB embedded
- ObjectDB server