Comparison of OpenJPA with HSQLDB embedded vs EclipseLink 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 | EclipseLink PostgreSQL server | OpenJPA HSQLDB embedded | EclipseLink PostgreSQL server | OpenJPA HSQLDB embedded | EclipseLink PostgreSQL server |
Basic Person Test | 13.3 | 7.3 | 6.9 | 4.2 | 10.1 | 5.8 |
Element Collection Test | 8.6 | 3.1 | 5.3 | 1.9 | 7.0 | 2.5 |
Inheritance Test | 12.2 | 6.9 | 5.8 | 5.0 | 9.0 | 5.9 |
Indexing Test | 16.7 | 10.0 | 9.1 | 6.8 | 12.9 | 8.4 |
Graph (Binary Tree) Test | 6.1 | 3.5 | 7.3 | 3.3 | 6.7 | 3.4 |
Multithreading Test | 26.8 | 31.8 | 7.0 | 14.5 | 16.9 | 23.1 |
All Tests | 13.9 | 10.4 | 6.9 | 6.0 | 10.4 | 8.2 |
The results above show that in general OpenJPA with HSQLDB embedded is slightly more efficient than EclipseLink with PostgreSQL server in persisting JPA entity objects to the database.
A large performance gap has been detected when using JPA element collections with large transaction size. Comparing the normalized speed of EclipseLink with PostgreSQL database server (1.9) to the normalized speed of OpenJPA with HSQLDB embedded database (5.3) reveals that in that case, OpenJPA with HSQLDB embedded is 2.8 times faster than EclipseLink with PostgreSQL server.
On the other hand, OpenJPA with HSQLDB embedded is slower, for instance, when using multithreading with large transaction size. Comparing the normalized speed of OpenJPA with HSQLDB embedded database (7.0) to the normalized speed of EclipseLink with PostgreSQL database server (14.5) reveals that in that case, OpenJPA with HSQLDB embedded is 2.1 times slower than EclipseLink 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 | EclipseLink PostgreSQL server | OpenJPA HSQLDB embedded | EclipseLink PostgreSQL server | OpenJPA HSQLDB embedded | EclipseLink PostgreSQL server |
Basic Person Test | 21.8 | 6.8 | 30.1 | 17.2 | 25.9 | 12.0 |
Element Collection Test | 0.0068 | 0.026 | 4.5 | 0.020 | 2.2 | 0.023 |
Inheritance Test | 0.0025 | 6.0 | 2.0 | 19.7 | 0.98 | 12.9 |
Indexing Test | 22.1 | 5.6 | 43.6 | 19.5 | 32.9 | 12.6 |
Graph (Binary Tree) Test | 2.1 | 0.47 | 2.1 | 0.61 | 2.1 | 0.54 |
Multithreading Test | 20.9 | 13.5 | 23.5 | 27.8 | 22.2 | 20.6 |
All Tests | 11.1 | 5.4 | 17.6 | 14.1 | 14.4 | 9.8 |
The results above show that in general OpenJPA with HSQLDB embedded is more efficient than EclipseLink with PostgreSQL server in retrieving JPA entity objects from the database.
A huge performance gap has been detected when using JPA element collections with large retrieval size. Comparing the normalized speed of EclipseLink with PostgreSQL database server (0.020) to the normalized speed of OpenJPA with HSQLDB embedded database (4.5) reveals that in that case, OpenJPA with HSQLDB embedded is 225 times faster than EclipseLink 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 EclipseLink with PostgreSQL database server (6.0) reveals that in that case, OpenJPA with HSQLDB embedded is 2,400 times slower than EclipseLink 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 | EclipseLink PostgreSQL server | OpenJPA HSQLDB embedded | EclipseLink PostgreSQL server | OpenJPA HSQLDB embedded | EclipseLink PostgreSQL server |
Basic Person Test | 2.8 | 55.5 | 0.91 | 7.8 | 1.9 | 31.6 |
Element Collection Test | 1.4 | 15.4 | 0.95 | 0.028 | 1.2 | 7.7 |
Inheritance Test | 2.4 | 54.9 | 1.3 | 11.5 | 1.8 | 33.2 |
Indexing Test | 15.4 | 0.077 | 34.3 | 10.0 | 24.9 | 5.1 |
Multithreading Test | 1.4 | 55.3 | 0.53 | 12.0 | 0.95 | 33.7 |
All Tests | 4.7 | 36.2 | 7.6 | 8.3 | 6.1 | 22.3 |
The results above show that in general EclipseLink with PostgreSQL server is much more efficient than OpenJPA with HSQLDB embedded in executing the tested JPA queries. Comparing the normalized speed of OpenJPA with HSQLDB embedded database (6.1) to the normalized speed of EclipseLink with PostgreSQL database server (22.3) reveals that in these tests, EclipseLink with PostgreSQL server is 3.7 times faster than OpenJPA with HSQLDB embedded.
A huge performance gap has been detected when using multithreading with small retrieval size. Comparing the normalized speed of OpenJPA with HSQLDB embedded database (1.4) to the normalized speed of EclipseLink with PostgreSQL database server (55.3) reveals that in that case, EclipseLink with PostgreSQL server is 39.5 times faster than OpenJPA with HSQLDB embedded.
On the other hand, EclipseLink with PostgreSQL server is slower, for instance, when using database indexes with small retrieval size. Comparing the normalized speed of EclipseLink with PostgreSQL database server (0.077) to the normalized speed of OpenJPA with HSQLDB embedded database (15.4) reveals that in that case, EclipseLink with PostgreSQL server is 200 times slower than OpenJPA with HSQLDB embedded.
Speed comparison of JPA database update operations (normalized score, higher is better)
Transaction Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | OpenJPA HSQLDB embedded | EclipseLink PostgreSQL server | OpenJPA HSQLDB embedded | EclipseLink PostgreSQL server | OpenJPA HSQLDB embedded | EclipseLink PostgreSQL server |
Basic Person Test | 12.0 | 6.2 | 5.3 | 4.1 | 8.6 | 5.1 |
Element Collection Test | 0.017 | 0.080 | 3.7 | 0.028 | 1.8 | 0.054 |
Inheritance Test | 0.0098 | 6.4 | 2.0 | 6.1 | 0.99 | 6.2 |
Indexing Test | 9.3 | 6.5 | 5.5 | 7.0 | 7.4 | 6.8 |
Graph (Binary Tree) Test | 2.5 | 0.90 | 1.6 | 0.50 | 2.1 | 0.70 |
Multithreading Test | 20.0 | 36.0 | 3.7 | 9.1 | 11.8 | 22.5 |
All Tests | 7.3 | 9.3 | 3.6 | 4.5 | 5.5 | 6.9 |
The results above show that in general EclipseLink with PostgreSQL server 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 EclipseLink with PostgreSQL database server (6.4) reveals that in that case, EclipseLink with PostgreSQL server is 653 times faster than OpenJPA with HSQLDB embedded.
On the other hand, EclipseLink with PostgreSQL server is slower, for instance, when using JPA element collections with large transaction size. Comparing the normalized speed of EclipseLink with PostgreSQL database server (0.028) to the normalized speed of OpenJPA with HSQLDB embedded database (3.7) reveals that in that case, EclipseLink with PostgreSQL server is 132 times slower 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 | EclipseLink PostgreSQL server | OpenJPA HSQLDB embedded | EclipseLink PostgreSQL server | OpenJPA HSQLDB embedded | EclipseLink PostgreSQL server |
Basic Person Test | 21.3 | 5.7 | 15.7 | 5.7 | 18.5 | 5.7 |
Element Collection Test | 0.011 | 0.025 | 2.9 | stopped | 1.5 | 0.012 |
Inheritance Test | 0.0070 | 5.5 | 3.5 | 5.4 | 1.8 | 5.4 |
Indexing Test | 28.8 | 10.4 | 15.2 | 10.0 | 22.0 | 10.2 |
Graph (Binary Tree) Test | 2.9 | 0.016 | 3.6 | 0.013 | 3.2 | 0.015 |
Multithreading Test | 26.0 | 26.3 | 19.6 | 16.8 | 22.8 | 21.6 |
All Tests | 13.2 | 8.0 | 10.1 | 6.3 | 11.6 | 7.2 |
The results above show that in general OpenJPA with HSQLDB embedded is more efficient than EclipseLink with PostgreSQL server in deleting JPA entity objects from the database.
A huge performance gap has been detected when using graphs of objects with large transaction size. Comparing the normalized speed of EclipseLink with PostgreSQL database server (0.013) to the normalized speed of OpenJPA with HSQLDB embedded database (3.6) reveals that in that case, OpenJPA with HSQLDB embedded is 277 times faster than EclipseLink 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 EclipseLink with PostgreSQL database server (5.5) reveals that in that case, OpenJPA with HSQLDB embedded is 786 times slower than EclipseLink 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 | EclipseLink PostgreSQL server | OpenJPA HSQLDB embedded | EclipseLink PostgreSQL server | OpenJPA HSQLDB embedded | EclipseLink PostgreSQL server |
Basic Person Test | 14.3 | 16.3 | 11.8 | 7.8 | 13.0 | 12.1 |
Element Collection Test | 2.0 | 3.7 | 3.5 | 0.40 | 2.7 | 2.1 |
Inheritance Test | 2.9 | 15.9 | 2.9 | 9.5 | 2.9 | 12.7 |
Indexing Test | 18.5 | 6.5 | 21.6 | 10.7 | 20.0 | 8.6 |
Graph (Binary Tree) Test | 3.4 | 1.2 | 3.7 | 1.1 | 3.5 | 1.2 |
Multithreading Test | 19.0 | 32.6 | 10.9 | 16.0 | 14.9 | 24.3 |
All Tests | 10.2 | 13.1 | 9.2 | 7.8 | 9.7 | 10.5 |
The results above show that in general EclipseLink with PostgreSQL server is slightly more efficient than OpenJPA with HSQLDB 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 HSQLDB embedded database (2.9) to the normalized speed of EclipseLink with PostgreSQL database server (15.9) reveals that in that case, EclipseLink with PostgreSQL server is 5.5 times faster than OpenJPA with HSQLDB embedded.
On the other hand, EclipseLink with PostgreSQL server is slower, for instance, when using JPA element collections with large transaction/retrieval size. Comparing the normalized speed of EclipseLink with PostgreSQL database server (0.40) to the normalized speed of OpenJPA with HSQLDB embedded database (3.5) reveals that in that case, EclipseLink with PostgreSQL server is 8.8 times slower than OpenJPA with HSQLDB 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
EclipseLink 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
- 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