Comparison of OpenJPA with Derby 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 Derby embedded | EclipseLink PostgreSQL server | OpenJPA Derby embedded | EclipseLink PostgreSQL server | OpenJPA Derby embedded | EclipseLink PostgreSQL server |
Basic Person Test | 4.8 | 7.3 | 2.9 | 4.2 | 3.9 | 5.8 |
Element Collection Test | 2.8 | 3.1 | 1.9 | 1.9 | 2.4 | 2.5 |
Inheritance Test | 4.1 | 6.9 | 2.4 | 5.0 | 3.3 | 5.9 |
Indexing Test | 6.1 | 10.0 | 4.1 | 6.8 | 5.1 | 8.4 |
Graph (Binary Tree) Test | 1.5 | 3.5 | 1.4 | 3.3 | 1.4 | 3.4 |
Multithreading Test | 8.7 | 31.8 | 3.3 | 14.5 | 6.0 | 23.1 |
All Tests | 4.7 | 10.4 | 2.7 | 6.0 | 3.7 | 8.2 |
The results above show that in general EclipseLink with PostgreSQL server is more efficient than OpenJPA with Derby embedded in persisting JPA entity objects to the database. Comparing the normalized speed of OpenJPA with Derby embedded database (3.7) to the normalized speed of EclipseLink with PostgreSQL database server (8.2) reveals that in these tests, EclipseLink with PostgreSQL server is 2.2 times faster than OpenJPA with Derby embedded.
A large performance gap has been detected when using multithreading with large transaction size. Comparing the normalized speed of OpenJPA with Derby embedded database (3.3) to the normalized speed of EclipseLink with PostgreSQL database server (14.5) reveals that in that case, EclipseLink with PostgreSQL server is 4.4 times faster than OpenJPA with Derby embedded.
Speed comparison of JPA database retrieval operations (normalized score, higher is better)
Retrieval Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | OpenJPA Derby embedded | EclipseLink PostgreSQL server | OpenJPA Derby embedded | EclipseLink PostgreSQL server | OpenJPA Derby embedded | EclipseLink PostgreSQL server |
Basic Person Test | 14.8 | 6.8 | 22.6 | 17.2 | 18.7 | 12.0 |
Element Collection Test | 0.0031 | 0.026 | 2.3 | 0.020 | 1.2 | 0.023 |
Inheritance Test | 0.015 | 6.0 | 7.0 | 19.7 | 3.5 | 12.9 |
Indexing Test | 11.7 | 5.6 | 26.5 | 19.5 | 19.1 | 12.6 |
Graph (Binary Tree) Test | 0.93 | 0.47 | 1.2 | 0.61 | 1.1 | 0.54 |
Multithreading Test | 25.2 | 13.5 | 28.6 | 27.8 | 26.9 | 20.6 |
All Tests | 8.8 | 5.4 | 14.7 | 14.1 | 11.7 | 9.8 |
The results above show that in general OpenJPA with Derby embedded is slightly 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 Derby embedded database (2.3) reveals that in that case, OpenJPA with Derby embedded is 115 times faster than EclipseLink with PostgreSQL server.
On the other hand, OpenJPA with Derby embedded is slower, for instance, when using class inheritance in the object model with small retrieval size. Comparing the normalized speed of OpenJPA with Derby embedded database (0.015) to the normalized speed of EclipseLink with PostgreSQL database server (6.0) reveals that in that case, OpenJPA with Derby embedded is 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 Derby embedded | EclipseLink PostgreSQL server | OpenJPA Derby embedded | EclipseLink PostgreSQL server | OpenJPA Derby embedded | EclipseLink PostgreSQL server |
Basic Person Test | 49.7 | 55.5 | 9.9 | 7.8 | 29.8 | 31.6 |
Element Collection Test | 2.7 | 15.4 | 9.6 | 0.028 | 6.1 | 7.7 |
Inheritance Test | 2.3 | 54.9 | 1.3 | 11.5 | 1.8 | 33.2 |
Indexing Test | 7.0 | 0.077 | 17.1 | 10.0 | 12.1 | 5.1 |
Multithreading Test | 40.9 | 55.3 | 11.7 | 12.0 | 26.3 | 33.7 |
All Tests | 20.5 | 36.2 | 9.9 | 8.3 | 15.2 | 22.3 |
The results above show that in general EclipseLink with PostgreSQL server is more efficient than OpenJPA with Derby embedded in executing the tested JPA queries.
A huge performance gap has been detected when using class inheritance in the object model with small retrieval size. Comparing the normalized speed of OpenJPA with Derby embedded database (2.3) to the normalized speed of EclipseLink with PostgreSQL database server (54.9) reveals that in that case, EclipseLink with PostgreSQL server is 23.9 times faster than OpenJPA with Derby embedded.
On the other hand, EclipseLink with PostgreSQL server is slower, for instance, when using JPA element collections with large retrieval size. Comparing the normalized speed of EclipseLink with PostgreSQL database server (0.028) to the normalized speed of OpenJPA with Derby embedded database (9.6) reveals that in that case, EclipseLink with PostgreSQL server is 343 times slower than OpenJPA with Derby embedded.
Speed comparison of JPA database update operations (normalized score, higher is better)
Transaction Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | OpenJPA Derby embedded | EclipseLink PostgreSQL server | OpenJPA Derby embedded | EclipseLink PostgreSQL server | OpenJPA Derby embedded | EclipseLink PostgreSQL server |
Basic Person Test | 5.6 | 6.2 | 5.2 | 4.1 | 5.4 | 5.1 |
Element Collection Test | 0.0090 | 0.080 | 2.2 | 0.028 | 1.1 | 0.054 |
Inheritance Test | 0.045 | 6.4 | 4.6 | 6.1 | 2.3 | 6.2 |
Indexing Test | 6.1 | 6.5 | 8.7 | 7.0 | 7.4 | 6.8 |
Graph (Binary Tree) Test | 1.6 | 0.90 | 0.91 | 0.50 | 1.3 | 0.70 |
Multithreading Test | 18.3 | 36.0 | 4.5 | 9.1 | 11.4 | 22.5 |
All Tests | 5.3 | 9.3 | 4.4 | 4.5 | 4.8 | 6.9 |
The results above show that in general EclipseLink with PostgreSQL server is more efficient than OpenJPA with Derby 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 Derby embedded database (0.045) to the normalized speed of EclipseLink with PostgreSQL database server (6.4) reveals that in that case, EclipseLink with PostgreSQL server is 142 times faster than OpenJPA with Derby 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 Derby embedded database (2.2) reveals that in that case, EclipseLink with PostgreSQL server is 78.6 times slower than OpenJPA with Derby embedded.
Speed comparison of JPA database removal operations (normalized score, higher is better)
Transaction Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | OpenJPA Derby embedded | EclipseLink PostgreSQL server | OpenJPA Derby embedded | EclipseLink PostgreSQL server | OpenJPA Derby embedded | EclipseLink PostgreSQL server |
Basic Person Test | 4.2 | 5.7 | 4.5 | 5.7 | 4.3 | 5.7 |
Element Collection Test | 0.0071 | 0.025 | 1.6 | stopped | 0.80 | 0.012 |
Inheritance Test | 0.035 | 5.5 | 3.0 | 5.4 | 1.5 | 5.4 |
Indexing Test | 5.3 | 10.4 | 3.6 | 10.0 | 4.4 | 10.2 |
Graph (Binary Tree) Test | 0.80 | 0.016 | 0.93 | 0.013 | 0.86 | 0.015 |
Multithreading Test | 5.7 | 26.3 | 6.2 | 16.8 | 6.0 | 21.6 |
All Tests | 2.7 | 8.0 | 3.3 | 6.3 | 3.0 | 7.2 |
The results above show that in general EclipseLink with PostgreSQL server is more efficient than OpenJPA with Derby embedded in deleting JPA entity objects from the database. Comparing the normalized speed of OpenJPA with Derby embedded database (3.0) to the normalized speed of EclipseLink with PostgreSQL database server (7.2) reveals that in these tests, EclipseLink with PostgreSQL server is 2.4 times faster than OpenJPA with Derby embedded.
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 Derby embedded database (0.035) to the normalized speed of EclipseLink with PostgreSQL database server (5.5) reveals that in that case, EclipseLink with PostgreSQL server is 157 times faster than OpenJPA with Derby embedded.
On the other hand, EclipseLink with PostgreSQL server is slower, for instance, 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 Derby embedded database (0.93) reveals that in that case, EclipseLink with PostgreSQL server is 71.5 times slower than OpenJPA with Derby embedded.
Comparison of JPA/Database speed - the averages (normalized score, higher is better)
Transaction/Retrieval Size | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | OpenJPA Derby embedded | EclipseLink PostgreSQL server | OpenJPA Derby embedded | EclipseLink PostgreSQL server | OpenJPA Derby embedded | EclipseLink PostgreSQL server |
Basic Person Test | 15.8 | 16.3 | 9.0 | 7.8 | 12.4 | 12.1 |
Element Collection Test | 1.1 | 3.7 | 3.5 | 0.40 | 2.3 | 2.1 |
Inheritance Test | 1.3 | 15.9 | 3.7 | 9.5 | 2.5 | 12.7 |
Indexing Test | 7.2 | 6.5 | 12.0 | 10.7 | 9.6 | 8.6 |
Graph (Binary Tree) Test | 1.2 | 1.2 | 1.1 | 1.1 | 1.2 | 1.2 |
Multithreading Test | 19.8 | 32.6 | 10.9 | 16.0 | 15.3 | 24.3 |
All Tests | 8.0 | 13.1 | 6.9 | 7.8 | 7.4 | 10.5 |
The results above show that in general EclipseLink with PostgreSQL server is more efficient than OpenJPA with Derby embedded in performing JPA database operations.
A huge 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 Derby embedded database (1.3) to the normalized speed of EclipseLink with PostgreSQL database server (15.9) reveals that in that case, EclipseLink with PostgreSQL server is 12.2 times faster than OpenJPA with Derby 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 Derby embedded database (3.5) reveals that in that case, EclipseLink with PostgreSQL server is 8.8 times slower than OpenJPA with Derby embedded.
Other Head to Head DBMS/JPA Comparisons
OpenJPA with Derby 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 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
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