Compare with

Comparison of OpenJPA with MySQL 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
MySQL server
EclipseLink
Derby embedded
OpenJPA
MySQL server
EclipseLink
Derby embedded
OpenJPA
MySQL server
EclipseLink
Derby embedded
Basic Person Test3.95.51.63.72.74.6
Element Collection Test1.63.00.681.71.12.4
Inheritance Test3.65.31.43.52.54.4
Indexing Test5.66.92.44.64.05.8
Graph (Binary Tree) Test0.682.00.571.90.631.9
Multithreading Test7.29.32.74.14.96.7
All Tests3.75.31.53.22.64.3

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
 OpenJPA
MySQL server
EclipseLink
Derby embedded
OpenJPA
MySQL server
EclipseLink
Derby embedded
OpenJPA
MySQL server
EclipseLink
Derby embedded
Basic Person Test3.216.422.758.712.937.5
Element Collection Test0.00387.52.913.31.410.4
Inheritance Test0.01717.16.958.93.438.0
Indexing Test2.414.223.467.412.940.8
Graph (Binary Tree) Test0.272.80.355.70.314.2
Multithreading Test0.1428.018.148.79.138.4
All Tests1.014.312.442.16.728.2

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
 OpenJPA
MySQL server
EclipseLink
Derby embedded
OpenJPA
MySQL server
EclipseLink
Derby embedded
OpenJPA
MySQL server
EclipseLink
Derby embedded
Basic Person Test9.353.42.213.85.833.6
Element Collection Test4.837.91.14.42.921.2
Inheritance Test1.537.40.9015.01.226.2
Indexing Test0.317.62.149.31.228.4
Multithreading Test1.941.20.996.11.423.6
All Tests3.635.51.517.72.526.6

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
 OpenJPA
MySQL server
EclipseLink
Derby embedded
OpenJPA
MySQL server
EclipseLink
Derby embedded
OpenJPA
MySQL server
EclipseLink
Derby embedded
Basic Person Test0.746.41.66.71.26.5
Element Collection Test0.0145.41.76.20.875.8
Inheritance Test0.0486.52.09.21.07.8
Indexing Test0.747.33.011.11.99.2
Graph (Binary Tree) Test0.452.80.251.70.352.2
Multithreading Test0.5521.32.95.01.713.1
All Tests0.428.31.96.61.27.5

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
 OpenJPA
MySQL server
EclipseLink
Derby embedded
OpenJPA
MySQL server
EclipseLink
Derby embedded
OpenJPA
MySQL server
EclipseLink
Derby embedded
Basic Person Test0.984.61.74.71.44.6
Element Collection Test0.00992.50.651.40.331.9
Inheritance Test0.0333.91.54.50.754.2
Indexing Test0.646.22.03.81.35.0
Graph (Binary Tree) Test0.411.10.431.00.421.1
Multithreading Test0.276.22.95.81.66.0
All Tests0.394.11.53.50.963.8

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
 OpenJPA
MySQL server
EclipseLink
Derby embedded
OpenJPA
MySQL server
EclipseLink
Derby embedded
OpenJPA
MySQL server
EclipseLink
Derby embedded
Basic Person Test3.617.36.017.54.817.4
Element Collection Test1.311.31.45.41.38.3
Inheritance Test1.014.02.518.21.816.1
Indexing Test1.98.46.627.24.317.8
Graph (Binary Tree) Test0.452.20.402.60.432.4
Multithreading Test2.021.25.513.93.817.6
All Tests1.812.73.914.52.813.6

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