Compare with

Comparison of EclipseLink with Derby embedded vs OpenJPA with MySQL 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
MySQL server
EclipseLink
Derby embedded
OpenJPA
MySQL server
EclipseLink
Derby embedded
OpenJPA
MySQL server
Basic Person Test5.53.93.71.64.62.7
Element Collection Test3.01.61.70.682.41.1
Inheritance Test5.33.63.51.44.42.5
Indexing Test6.95.64.62.45.84.0
Graph (Binary Tree) Test2.00.681.90.571.90.63
Multithreading Test9.37.24.12.76.74.9
All Tests5.33.73.21.54.32.6

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
Derby embedded
OpenJPA
MySQL server
EclipseLink
Derby embedded
OpenJPA
MySQL server
EclipseLink
Derby embedded
OpenJPA
MySQL server
Basic Person Test16.43.258.722.737.512.9
Element Collection Test7.50.003813.32.910.41.4
Inheritance Test17.10.01758.96.938.03.4
Indexing Test14.22.467.423.440.812.9
Graph (Binary Tree) Test2.80.275.70.354.20.31
Multithreading Test28.00.1448.718.138.49.1
All Tests14.31.042.112.428.26.7

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

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
Derby embedded
OpenJPA
MySQL server
EclipseLink
Derby embedded
OpenJPA
MySQL server
EclipseLink
Derby embedded
OpenJPA
MySQL server
Basic Person Test53.49.313.82.233.65.8
Element Collection Test37.94.84.41.121.22.9
Inheritance Test37.41.515.00.9026.21.2
Indexing Test7.60.3149.32.128.41.2
Multithreading Test41.21.96.10.9923.61.4
All Tests35.53.617.71.526.62.5

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

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 MySQL database server (1.5) to the normalized speed of EclipseLink with Derby embedded database (37.4) reveals that in that case, EclipseLink with Derby embedded is 24.9 times faster than OpenJPA with MySQL server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
Derby embedded
OpenJPA
MySQL server
EclipseLink
Derby embedded
OpenJPA
MySQL server
EclipseLink
Derby embedded
OpenJPA
MySQL server
Basic Person Test6.40.746.71.66.51.2
Element Collection Test5.40.0146.21.75.80.87
Inheritance Test6.50.0489.22.07.81.0
Indexing Test7.30.7411.13.09.21.9
Graph (Binary Tree) Test2.80.451.70.252.20.35
Multithreading Test21.30.555.02.913.11.7
All Tests8.30.426.61.97.51.2

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

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
Derby embedded
OpenJPA
MySQL server
EclipseLink
Derby embedded
OpenJPA
MySQL server
EclipseLink
Derby embedded
OpenJPA
MySQL server
Basic Person Test4.60.984.71.74.61.4
Element Collection Test2.50.00991.40.651.90.33
Inheritance Test3.90.0334.51.54.20.75
Indexing Test6.20.643.82.05.01.3
Graph (Binary Tree) Test1.10.411.00.431.10.42
Multithreading Test6.20.275.82.96.01.6
All Tests4.10.393.51.53.80.96

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

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

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 EclipseLink
Derby embedded
OpenJPA
MySQL server
EclipseLink
Derby embedded
OpenJPA
MySQL server
EclipseLink
Derby embedded
OpenJPA
MySQL server
Basic Person Test17.33.617.56.017.44.8
Element Collection Test11.31.35.41.48.31.3
Inheritance Test14.01.018.22.516.11.8
Indexing Test8.41.927.26.617.84.3
Graph (Binary Tree) Test2.20.452.60.402.40.43
Multithreading Test21.22.013.95.517.63.8
All Tests12.71.814.53.913.62.8

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

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 MySQL database server (1.0) to the normalized speed of EclipseLink with Derby embedded database (14.0) reveals that in that case, EclipseLink with Derby embedded is 14.0 times faster than OpenJPA with MySQL server.

Other Head to Head DBMS/JPA Comparisons