Compare with

Comparison of EclipseLink with Derby embedded vs OpenJPA with Derby 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 EntitiesMany EntitiesAverage Score
 EclipseLink
Derby embedded
OpenJPA
Derby server
EclipseLink
Derby embedded
OpenJPA
Derby server
EclipseLink
Derby embedded
OpenJPA
Derby server
Basic Person Test5.53.13.72.74.62.9
Element Collection Test3.02.01.71.72.41.8
Inheritance Test5.33.03.52.34.42.6
Indexing Test6.94.74.64.15.84.4
Graph (Binary Tree) Test2.00.711.90.641.90.67
Multithreading Test9.36.04.13.86.74.9
All Tests5.33.33.22.54.32.9

The results above show that in general EclipseLink with Derby embedded is more efficient than OpenJPA with Derby 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 Derby database server (0.64) to the normalized speed of EclipseLink with Derby embedded database (1.9) reveals that in that case, EclipseLink with Derby embedded is 3.0 times faster than OpenJPA with Derby server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
Derby embedded
OpenJPA
Derby server
EclipseLink
Derby embedded
OpenJPA
Derby server
EclipseLink
Derby embedded
OpenJPA
Derby server
Basic Person Test16.40.7858.711.637.56.2
Element Collection Test7.50.002413.31.110.40.54
Inheritance Test17.10.01458.95.038.02.5
Indexing Test14.20.6267.413.040.86.8
Graph (Binary Tree) Test2.80.0655.70.394.20.23
Multithreading Test28.01.648.719.038.410.3
All Tests14.30.5142.18.428.24.4

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

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
Derby embedded
OpenJPA
Derby server
EclipseLink
Derby embedded
OpenJPA
Derby server
EclipseLink
Derby embedded
OpenJPA
Derby server
Basic Person Test53.429.213.85.533.617.3
Element Collection Test37.92.24.41.421.21.8
Inheritance Test37.42.215.01.026.21.6
Indexing Test7.62.249.311.728.47.0
Multithreading Test41.235.56.18.323.621.9
All Tests35.514.317.75.626.69.9

The results above show that in general EclipseLink with Derby embedded is more efficient than OpenJPA with Derby server in executing the tested JPA queries. Comparing the normalized speed of OpenJPA with Derby database server (9.9) to the normalized speed of EclipseLink with Derby embedded database (26.6) reveals that in these tests, EclipseLink with Derby embedded is 2.7 times faster than OpenJPA with Derby server.

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
Derby embedded
OpenJPA
Derby server
EclipseLink
Derby embedded
OpenJPA
Derby server
EclipseLink
Derby embedded
OpenJPA
Derby server
Basic Person Test6.41.56.74.06.52.8
Element Collection Test5.40.00816.21.95.80.94
Inheritance Test6.50.0439.23.87.81.9
Indexing Test7.31.811.16.89.24.3
Graph (Binary Tree) Test2.80.161.70.272.20.22
Multithreading Test21.36.95.05.013.15.9
All Tests8.31.76.63.67.52.7

The results above show that in general EclipseLink with Derby embedded is more efficient than OpenJPA with Derby server in updating JPA entity objects in the database. Comparing the normalized speed of OpenJPA with Derby database server (2.7) to the normalized speed of EclipseLink with Derby embedded database (7.5) reveals that in these tests, EclipseLink with Derby embedded is 2.8 times faster than OpenJPA with Derby server.

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
Derby embedded
OpenJPA
Derby server
EclipseLink
Derby embedded
OpenJPA
Derby server
EclipseLink
Derby embedded
OpenJPA
Derby server
Basic Person Test4.61.44.73.74.62.5
Element Collection Test2.50.00821.41.41.90.71
Inheritance Test3.90.0354.52.54.21.3
Indexing Test6.22.33.83.55.02.9
Graph (Binary Tree) Test1.10.131.00.351.10.24
Multithreading Test6.23.65.84.06.03.8
All Tests4.11.33.52.63.81.9

The results above show that in general EclipseLink with Derby embedded is more efficient than OpenJPA with Derby server in deleting JPA entity objects from the database. Comparing the normalized speed of OpenJPA with Derby database server (1.9) to the normalized speed of EclipseLink with Derby embedded database (3.8) reveals that in these tests, EclipseLink with Derby embedded is 2.0 times faster than OpenJPA with Derby server.

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

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 EclipseLink
Derby embedded
OpenJPA
Derby server
EclipseLink
Derby embedded
OpenJPA
Derby server
EclipseLink
Derby embedded
OpenJPA
Derby server
Basic Person Test17.37.217.55.517.46.4
Element Collection Test11.30.845.41.58.31.2
Inheritance Test14.01.118.22.916.12.0
Indexing Test8.42.327.27.817.85.1
Graph (Binary Tree) Test2.20.272.60.412.40.34
Multithreading Test21.210.713.98.017.69.4
All Tests12.73.914.54.513.64.2

The results above show that in general EclipseLink with Derby embedded is much more efficient than OpenJPA with Derby server in performing JPA database operations. Comparing the normalized speed of OpenJPA with Derby database server (4.2) to the normalized speed of EclipseLink with Derby embedded database (13.6) reveals that in these tests, EclipseLink with Derby embedded is 3.2 times faster than OpenJPA with Derby 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 Derby database server (0.84) to the normalized speed of EclipseLink with Derby embedded database (11.3) reveals that in that case, EclipseLink with Derby embedded is 13.5 times faster than OpenJPA with Derby server.

Other Head to Head DBMS/JPA Comparisons