Compare with

Comparison of OpenJPA with PostgreSQL server vs EclipseLink with Derby 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 EntitiesMany EntitiesAverage Score
 OpenJPA
PostgreSQL server
EclipseLink
Derby embedded
OpenJPA
PostgreSQL server
EclipseLink
Derby embedded
OpenJPA
PostgreSQL server
EclipseLink
Derby embedded
Basic Person Test5.25.54.83.75.04.6
Element Collection Test2.83.02.21.72.52.4
Inheritance Test4.65.33.23.53.94.4
Indexing Test7.46.96.94.67.15.8
Graph (Binary Tree) Test0.982.00.811.90.891.9
Multithreading Test23.49.39.14.116.26.7
All Tests7.45.34.53.25.94.3

The results above show that in general OpenJPA with PostgreSQL server is more efficient than EclipseLink with Derby embedded in persisting JPA entity objects to the database.

A large performance gap has been detected when using multithreading with small transaction size. Comparing the normalized speed of EclipseLink with Derby embedded database (9.3) to the normalized speed of OpenJPA with PostgreSQL database server (23.4) reveals that in that case, OpenJPA with PostgreSQL server is 2.5 times faster than EclipseLink with Derby embedded.

On the other hand, OpenJPA with PostgreSQL server is slower, for instance, 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 EclipseLink with Derby embedded database (1.9) reveals that in that case, OpenJPA with PostgreSQL server is 2.3 times slower than EclipseLink with Derby embedded.

Speed comparison of JPA database retrieval operations (normalized score, higher is better)

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
PostgreSQL server
EclipseLink
Derby embedded
OpenJPA
PostgreSQL server
EclipseLink
Derby embedded
OpenJPA
PostgreSQL server
EclipseLink
Derby embedded
Basic Person Test5.816.416.158.710.937.5
Element Collection Test0.0137.58.713.34.410.4
Inheritance Test5.217.117.658.911.438.0
Indexing Test4.814.218.767.411.840.8
Graph (Binary Tree) Test0.272.80.355.70.314.2
Multithreading Test11.928.023.348.717.638.4
All Tests4.714.314.142.19.428.2

The results above show that in general EclipseLink with Derby embedded is much more efficient than OpenJPA with PostgreSQL server in retrieving JPA entity objects from the database. Comparing the normalized speed of OpenJPA with PostgreSQL database server (9.4) to the normalized speed of EclipseLink with Derby embedded database (28.2) reveals that in these tests, EclipseLink with Derby embedded is 3.0 times faster than OpenJPA with PostgreSQL server.

A huge performance gap has been detected when using JPA element collections with small retrieval size. Comparing the normalized speed of OpenJPA with PostgreSQL database server (0.013) to the normalized speed of EclipseLink with Derby embedded database (7.5) reveals that in that case, EclipseLink with Derby embedded is 577 times faster than OpenJPA with PostgreSQL server.

Speed comparison of JPA database query operations (normalized score, higher is better)

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
PostgreSQL server
EclipseLink
Derby embedded
OpenJPA
PostgreSQL server
EclipseLink
Derby embedded
OpenJPA
PostgreSQL server
EclipseLink
Derby embedded
Basic Person Testfailed53.4failed13.8failed33.6
Element Collection Testfailed37.9failed4.4failed21.2
Inheritance Testfailed37.4failed15.0failed26.2
Indexing Testfailed7.6failed49.3failed28.4
Multithreading Testfailed41.2failed6.1failed23.6
All Testsfailed35.5failed17.7failed26.6

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 EntitiesMany EntitiesAverage Score
 OpenJPA
PostgreSQL server
EclipseLink
Derby embedded
OpenJPA
PostgreSQL server
EclipseLink
Derby embedded
OpenJPA
PostgreSQL server
EclipseLink
Derby embedded
Basic Person Test4.96.43.96.74.46.5
Element Collection Test0.0335.44.66.22.35.8
Inheritance Test4.86.54.99.24.97.8
Indexing Test5.17.36.011.15.69.2
Graph (Binary Tree) Test0.572.80.311.70.442.2
Multithreading Test22.221.37.45.014.813.1
All Tests6.38.34.56.65.47.5

The results above show that in general EclipseLink with Derby embedded is more efficient than OpenJPA with PostgreSQL server in updating JPA entity objects in the database.

A huge performance gap has been detected when using JPA element collections with small transaction size. Comparing the normalized speed of OpenJPA with PostgreSQL database server (0.033) to the normalized speed of EclipseLink with Derby embedded database (5.4) reveals that in that case, EclipseLink with Derby embedded is 164 times faster than OpenJPA with PostgreSQL server.

Speed comparison of JPA database removal operations (normalized score, higher is better)

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
PostgreSQL server
EclipseLink
Derby embedded
OpenJPA
PostgreSQL server
EclipseLink
Derby embedded
OpenJPA
PostgreSQL server
EclipseLink
Derby embedded
Basic Person Test4.64.65.34.75.04.6
Element Collection Test0.0322.52.81.41.41.9
Inheritance Test4.33.94.64.54.44.2
Indexing Test8.06.27.13.87.55.0
Graph (Binary Tree) Test0.531.10.551.00.541.1
Multithreading Test17.46.29.15.813.36.0
All Tests5.84.14.93.55.43.8

The results above show that in general OpenJPA with PostgreSQL server is more efficient than EclipseLink with Derby embedded in deleting JPA entity objects from the database.

A large performance gap has been detected when using multithreading with small transaction size. Comparing the normalized speed of EclipseLink with Derby embedded database (6.2) to the normalized speed of OpenJPA with PostgreSQL database server (17.4) reveals that in that case, OpenJPA with PostgreSQL server is 2.8 times faster than EclipseLink with Derby embedded.

On the other hand, OpenJPA with PostgreSQL server is slower, for instance, when using JPA element collections with small transaction size. Comparing the normalized speed of OpenJPA with PostgreSQL database server (0.032) to the normalized speed of EclipseLink with Derby embedded database (2.5) reveals that in that case, OpenJPA with PostgreSQL server is 78.1 times slower than EclipseLink with Derby embedded.

Comparison of JPA/Database speed - the averages (normalized score, higher is better)

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 OpenJPA
PostgreSQL server
EclipseLink
Derby embedded
OpenJPA
PostgreSQL server
EclipseLink
Derby embedded
OpenJPA
PostgreSQL server
EclipseLink
Derby embedded
Basic Person Test5.117.37.517.56.317.4
Element Collection Test0.7211.34.65.42.68.3
Inheritance Test4.714.07.618.26.216.1
Indexing Test6.38.49.727.28.017.8
Graph (Binary Tree) Test0.592.20.502.60.552.4
Multithreading Test18.721.212.213.915.517.6
All Tests6.012.77.014.56.513.6

The results above show that in general EclipseLink with Derby embedded is more efficient than OpenJPA with PostgreSQL server in performing JPA database operations. Comparing the normalized speed of OpenJPA with PostgreSQL database server (6.5) to the normalized speed of EclipseLink with Derby embedded database (13.6) reveals that in these tests, EclipseLink with Derby embedded is 2.1 times faster than OpenJPA with PostgreSQL server.

A huge performance gap has been detected when using JPA element collections with small transaction/retrieval size. Comparing the normalized speed of OpenJPA with PostgreSQL database server (0.72) to the normalized speed of EclipseLink with Derby embedded database (11.3) reveals that in that case, EclipseLink with Derby embedded is 15.7 times faster than OpenJPA with PostgreSQL server.

Other Head to Head DBMS/JPA Comparisons