Compare with

Comparison of EclipseLink with Derby server 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 server
OpenJPA
MySQL server
EclipseLink
Derby server
OpenJPA
MySQL server
EclipseLink
Derby server
OpenJPA
MySQL server
Basic Person Test3.83.93.11.63.42.7
Element Collection Test2.21.61.50.681.81.1
Inheritance Test3.93.62.91.43.42.5
Indexing Test5.25.64.32.44.74.0
Graph (Binary Tree) Test1.90.681.70.571.80.63
Multithreading Test6.17.23.92.75.04.9
All Tests3.83.72.91.53.42.6

The results above show that in general EclipseLink with Derby server 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 database server (1.7) reveals that in that case, EclipseLink with Derby server is 3.0 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 server
OpenJPA
MySQL server
EclipseLink
Derby server
OpenJPA
MySQL server
EclipseLink
Derby server
OpenJPA
MySQL server
Basic Person Test6.43.211.322.78.812.9
Element Collection Test1.80.00382.42.92.11.4
Inheritance Test3.70.01712.96.98.33.4
Indexing Test3.62.412.823.48.212.9
Graph (Binary Tree) Test0.610.270.730.350.670.31
Multithreading Test8.50.1419.818.114.19.1
All Tests4.11.010.012.47.06.7

The results above show that in general EclipseLink with Derby server is slightly more efficient than OpenJPA with MySQL server in retrieving JPA entity objects from the database.

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 database server (1.8) reveals that in that case, EclipseLink with Derby server is 474 times faster than OpenJPA with MySQL server.

On the other hand, EclipseLink with Derby server is slower, for instance, when using simple basic entities with large retrieval size. Comparing the normalized speed of EclipseLink with Derby database server (11.3) to the normalized speed of OpenJPA with MySQL database server (22.7) reveals that in that case, EclipseLink with Derby server is 2.0 times slower 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 server
OpenJPA
MySQL server
EclipseLink
Derby server
OpenJPA
MySQL server
EclipseLink
Derby server
OpenJPA
MySQL server
Basic Person Test45.89.35.32.225.65.8
Element Collection Test35.24.80.991.118.12.9
Inheritance Test23.11.55.90.9014.51.2
Indexing Test2.50.3112.22.17.41.2
Multithreading Test34.31.97.70.9921.01.4
All Tests28.23.66.41.517.32.5

The results above show that in general EclipseLink with Derby server 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 database server (17.3) reveals that in these tests, EclipseLink with Derby server is 6.9 times faster than OpenJPA with MySQL server.

A huge performance gap has been detected when using multithreading with small retrieval size. Comparing the normalized speed of OpenJPA with MySQL database server (1.9) to the normalized speed of EclipseLink with Derby database server (34.3) reveals that in that case, EclipseLink with Derby server is 18.1 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 server
OpenJPA
MySQL server
EclipseLink
Derby server
OpenJPA
MySQL server
EclipseLink
Derby server
OpenJPA
MySQL server
Basic Person Test3.90.744.41.64.11.2
Element Collection Test1.70.0141.61.71.60.87
Inheritance Test4.60.0486.12.05.31.0
Indexing Test4.50.747.63.06.11.9
Graph (Binary Tree) Test0.700.450.420.250.560.35
Multithreading Test7.30.554.82.96.01.7
All Tests3.80.424.21.94.01.2

The results above show that in general EclipseLink with Derby server 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 database server (4.0) reveals that in these tests, EclipseLink with Derby server is 3.3 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 database server (1.7) reveals that in that case, EclipseLink with Derby server is 121 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 server
OpenJPA
MySQL server
EclipseLink
Derby server
OpenJPA
MySQL server
EclipseLink
Derby server
OpenJPA
MySQL server
Basic Person Test2.80.983.91.73.31.4
Element Collection Test1.20.00990.550.650.870.33
Inheritance Test3.30.0333.71.53.50.75
Indexing Test4.90.643.52.04.21.3
Graph (Binary Tree) Test0.510.410.500.430.510.42
Multithreading Test4.80.275.72.95.31.6
All Tests2.90.393.01.53.00.96

The results above show that in general EclipseLink with Derby server 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 database server (3.0) reveals that in these tests, EclipseLink with Derby server is 3.1 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 database server (1.2) reveals that in that case, EclipseLink with Derby server is 121 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 server
OpenJPA
MySQL server
EclipseLink
Derby server
OpenJPA
MySQL server
EclipseLink
Derby server
OpenJPA
MySQL server
Basic Person Test12.53.65.66.09.14.8
Element Collection Test8.41.31.41.44.91.3
Inheritance Test7.71.06.32.57.01.8
Indexing Test4.11.98.16.66.14.3
Graph (Binary Tree) Test0.930.450.830.400.880.43
Multithreading Test12.22.08.45.510.33.8
All Tests7.91.85.23.96.62.8

The results above show that in general EclipseLink with Derby server is 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 database server (6.6) reveals that in these tests, EclipseLink with Derby server is 2.4 times faster than OpenJPA with MySQL server.

A large 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 database server (7.7) reveals that in that case, EclipseLink with Derby server is 7.7 times faster than OpenJPA with MySQL server.

Other Head to Head DBMS/JPA Comparisons