Comparison of EclipseLink with PostgreSQL server vs OpenJPA 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 | |||
---|---|---|---|---|---|---|
  | EclipseLink PostgreSQL server | OpenJPA H2 embedded | EclipseLink PostgreSQL server | OpenJPA H2 embedded | EclipseLink PostgreSQL server | OpenJPA H2 embedded |
Basic Person Test | 7.3 | 17.1 | 4.2 | 5.8 | 5.8 | 11.5 |
Element Collection Test | 3.1 | 10.9 | 1.9 | 4.9 | 2.5 | 7.9 |
Inheritance Test | 6.9 | 14.3 | 5.0 | 5.9 | 5.9 | 10.1 |
Indexing Test | 10.0 | 24.4 | 6.8 | 13.7 | 8.4 | 19.1 |
Graph (Binary Tree) Test | 3.5 | 6.8 | 3.3 | 6.7 | 3.4 | 6.7 |
Multithreading Test | 31.8 | 34.2 | 14.5 | 10.2 | 23.1 | 22.2 |
All Tests | 10.4 | 17.9 | 6.0 | 7.9 | 8.2 | 12.9 |
The results above show that in general OpenJPA with H2 embedded is 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 small transaction size. Comparing the normalized speed of EclipseLink with PostgreSQL database server (3.1) to the normalized speed of OpenJPA with H2 embedded database (10.9) reveals that in that case, OpenJPA with H2 embedded is 3.5 times faster 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 | |||
---|---|---|---|---|---|---|
  | EclipseLink PostgreSQL server | OpenJPA H2 embedded | EclipseLink PostgreSQL server | OpenJPA H2 embedded | EclipseLink PostgreSQL server | OpenJPA H2 embedded |
Basic Person Test | 6.8 | 14.6 | 17.2 | 27.2 | 12.0 | 20.9 |
Element Collection Test | 0.026 | 0.0046 | 0.020 | 4.3 | 0.023 | 2.1 |
Inheritance Test | 6.0 | 0.011 | 19.7 | 7.4 | 12.9 | 3.7 |
Indexing Test | 5.6 | 17.0 | 19.5 | 35.0 | 12.6 | 26.0 |
Graph (Binary Tree) Test | 0.47 | 1.0 | 0.61 | 1.4 | 0.54 | 1.2 |
Multithreading Test | 13.5 | 18.7 | 27.8 | 27.6 | 20.6 | 23.1 |
All Tests | 5.4 | 8.6 | 14.1 | 17.1 | 9.8 | 12.8 |
The results above show that in general OpenJPA with H2 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 H2 embedded database (4.3) reveals that in that case, OpenJPA with H2 embedded is 215 times faster than EclipseLink with PostgreSQL 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 PostgreSQL database server (6.0) reveals that in that case, OpenJPA with H2 embedded is 545 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 | |||
---|---|---|---|---|---|---|
  | EclipseLink PostgreSQL server | OpenJPA H2 embedded | EclipseLink PostgreSQL server | OpenJPA H2 embedded | EclipseLink PostgreSQL server | OpenJPA H2 embedded |
Basic Person Test | 55.5 | 5.0 | 7.8 | 1.1 | 31.6 | 3.1 |
Element Collection Test | 15.4 | 1.7 | 0.028 | 1.3 | 7.7 | 1.5 |
Inheritance Test | 54.9 | 2.2 | 11.5 | 1.2 | 33.2 | 1.7 |
Indexing Test | 0.077 | 13.8 | 10.0 | 23.2 | 5.1 | 18.5 |
Multithreading Test | 55.3 | 1.4 | 12.0 | 0.60 | 33.7 | 0.99 |
All Tests | 36.2 | 4.8 | 8.3 | 5.5 | 22.3 | 5.1 |
The results above show that in general EclipseLink with PostgreSQL server is much more efficient than OpenJPA with H2 embedded in executing the tested JPA queries. Comparing the normalized speed of OpenJPA with H2 embedded database (5.1) to the normalized speed of EclipseLink with PostgreSQL database server (22.3) reveals that in these tests, EclipseLink with PostgreSQL server is 4.4 times faster than OpenJPA with H2 embedded.
A huge performance gap has been detected when using multithreading with small retrieval size. Comparing the normalized speed of OpenJPA with H2 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 H2 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 H2 embedded database (13.8) reveals that in that case, EclipseLink with PostgreSQL server is 179 times slower than OpenJPA with H2 embedded.
Speed comparison of JPA database update operations (normalized score, higher is better)
Transaction Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | EclipseLink PostgreSQL server | OpenJPA H2 embedded | EclipseLink PostgreSQL server | OpenJPA H2 embedded | EclipseLink PostgreSQL server | OpenJPA H2 embedded |
Basic Person Test | 6.2 | 10.0 | 4.1 | 6.0 | 5.1 | 8.0 |
Element Collection Test | 0.080 | 0.011 | 0.028 | 3.8 | 0.054 | 1.9 |
Inheritance Test | 6.4 | 0.046 | 6.1 | 5.0 | 6.2 | 2.5 |
Indexing Test | 6.5 | 8.9 | 7.0 | 7.0 | 6.8 | 8.0 |
Graph (Binary Tree) Test | 0.90 | 2.4 | 0.50 | 1.3 | 0.70 | 1.9 |
Multithreading Test | 36.0 | 16.6 | 9.1 | 4.3 | 22.5 | 10.4 |
All Tests | 9.3 | 6.3 | 4.5 | 4.6 | 6.9 | 5.4 |
The results above show that in general EclipseLink with PostgreSQL server is slightly more efficient than OpenJPA with H2 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 H2 embedded database (0.046) to the normalized speed of EclipseLink with PostgreSQL database server (6.4) reveals that in that case, EclipseLink with PostgreSQL server is 139 times faster than OpenJPA with H2 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 H2 embedded database (3.8) reveals that in that case, EclipseLink with PostgreSQL server is 136 times slower 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 | |||
---|---|---|---|---|---|---|
  | EclipseLink PostgreSQL server | OpenJPA H2 embedded | EclipseLink PostgreSQL server | OpenJPA H2 embedded | EclipseLink PostgreSQL server | OpenJPA H2 embedded |
Basic Person Test | 5.7 | 18.3 | 5.7 | 11.1 | 5.7 | 14.7 |
Element Collection Test | 0.025 | 0.012 | stopped | 2.9 | 0.012 | 1.4 |
Inheritance Test | 5.5 | 0.030 | 5.4 | 6.6 | 5.4 | 3.3 |
Indexing Test | 10.4 | 23.2 | 10.0 | 9.7 | 10.2 | 16.4 |
Graph (Binary Tree) Test | 0.016 | 1.8 | 0.013 | 2.4 | 0.015 | 2.1 |
Multithreading Test | 26.3 | 31.2 | 16.8 | 17.3 | 21.6 | 24.2 |
All Tests | 8.0 | 12.4 | 6.3 | 8.3 | 7.2 | 10.4 |
The results above show that in general OpenJPA with H2 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 H2 embedded database (2.4) reveals that in that case, OpenJPA with H2 embedded is 185 times faster than EclipseLink with PostgreSQL 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 PostgreSQL database server (5.5) reveals that in that case, OpenJPA with H2 embedded is 183 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 | |||
---|---|---|---|---|---|---|
  | EclipseLink PostgreSQL server | OpenJPA H2 embedded | EclipseLink PostgreSQL server | OpenJPA H2 embedded | EclipseLink PostgreSQL server | OpenJPA H2 embedded |
Basic Person Test | 16.3 | 13.0 | 7.8 | 10.2 | 12.1 | 11.6 |
Element Collection Test | 3.7 | 2.5 | 0.40 | 3.4 | 2.1 | 3.0 |
Inheritance Test | 15.9 | 3.3 | 9.5 | 5.2 | 12.7 | 4.3 |
Indexing Test | 6.5 | 17.5 | 10.7 | 17.7 | 8.6 | 17.6 |
Graph (Binary Tree) Test | 1.2 | 3.0 | 1.1 | 3.0 | 1.2 | 3.0 |
Multithreading Test | 32.6 | 20.4 | 16.0 | 12.0 | 24.3 | 16.2 |
All Tests | 13.1 | 10.2 | 7.8 | 8.8 | 10.5 | 9.5 |
The results above show that in general EclipseLink with PostgreSQL server is slightly 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 PostgreSQL database server (15.9) reveals that in that case, EclipseLink with PostgreSQL server is 4.8 times faster than OpenJPA with H2 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 H2 embedded database (3.4) reveals that in that case, EclipseLink with PostgreSQL server is 8.5 times slower than OpenJPA with H2 embedded.
Other Head to Head DBMS/JPA Comparisons
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
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