Compare with

Comparison of EclipseLink with MySQL server 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
MySQL server
OpenJPA
Derby server
EclipseLink
MySQL server
OpenJPA
Derby server
EclipseLink
MySQL server
OpenJPA
Derby server
Basic Person Test3.63.11.52.72.62.9
Element Collection Test1.52.00.691.71.11.8
Inheritance Test3.53.01.42.32.42.6
Indexing Test5.34.72.54.13.94.4
Graph (Binary Tree) Test1.70.711.30.641.50.67
Multithreading Test7.26.02.43.84.84.9
All Tests3.83.31.62.52.72.9

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

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

On the other hand, OpenJPA with Derby server is slower, for instance, when using graphs of objects with small transaction size. Comparing the normalized speed of OpenJPA with Derby database server (0.71) to the normalized speed of EclipseLink with MySQL database server (1.7) reveals that in that case, OpenJPA with Derby server is 2.4 times slower than EclipseLink with MySQL server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
MySQL server
OpenJPA
Derby server
EclipseLink
MySQL server
OpenJPA
Derby server
EclipseLink
MySQL server
OpenJPA
Derby server
Basic Person Test0.430.7815.511.68.06.2
Element Collection Test0.160.00241.41.10.780.54
Inheritance Test0.390.01417.65.09.02.5
Indexing Test0.430.6216.613.08.56.8
Graph (Binary Tree) Test0.530.0650.760.390.650.23
Multithreading Test0.191.611.019.05.610.3
All Tests0.350.5110.58.45.44.4

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

On the other hand, EclipseLink with MySQL server is slower, for instance, when using multithreading with small retrieval size. Comparing the normalized speed of EclipseLink with MySQL database server (0.19) to the normalized speed of OpenJPA with Derby database server (1.6) reveals that in that case, EclipseLink with MySQL server is 8.4 times slower than OpenJPA with Derby server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
MySQL server
OpenJPA
Derby server
EclipseLink
MySQL server
OpenJPA
Derby server
EclipseLink
MySQL server
OpenJPA
Derby server
Basic Person Test1.529.20.445.50.9517.3
Element Collection Test1.42.20.431.40.921.8
Inheritance Test1.12.20.611.00.861.6
Indexing Test0.262.20.5211.70.397.0
Multithreading Test1.935.50.728.31.321.9
All Tests1.214.30.545.60.889.9

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

A huge performance gap has been detected when using database indexes with large retrieval size. Comparing the normalized speed of EclipseLink with MySQL database server (0.52) to the normalized speed of OpenJPA with Derby database server (11.7) reveals that in that case, OpenJPA with Derby server is 22.5 times faster than EclipseLink with MySQL server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
MySQL server
OpenJPA
Derby server
EclipseLink
MySQL server
OpenJPA
Derby server
EclipseLink
MySQL server
OpenJPA
Derby server
Basic Person Test0.391.51.84.01.12.8
Element Collection Test0.230.00811.41.90.830.94
Inheritance Test0.420.0432.63.81.51.9
Indexing Test0.461.83.16.81.84.3
Graph (Binary Tree) Test0.670.160.410.270.540.22
Multithreading Test0.486.92.65.01.55.9
All Tests0.441.72.03.61.22.7

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

A huge performance gap has been detected when using multithreading with small transaction size. Comparing the normalized speed of EclipseLink with MySQL database server (0.48) to the normalized speed of OpenJPA with Derby database server (6.9) reveals that in that case, OpenJPA with Derby server is 14.4 times faster than EclipseLink with MySQL server.

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
MySQL server
OpenJPA
Derby server
EclipseLink
MySQL server
OpenJPA
Derby server
EclipseLink
MySQL server
OpenJPA
Derby server
Basic Person Test0.351.41.73.71.02.5
Element Collection Test0.110.00820.511.40.310.71
Inheritance Test0.290.0351.62.50.941.3
Indexing Test0.462.31.93.51.22.9
Graph (Binary Tree) Test0.540.130.490.350.510.24
Multithreading Test0.313.63.64.01.93.8
All Tests0.341.31.62.60.981.9

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

A huge performance gap has been detected when using multithreading with small transaction size. Comparing the normalized speed of EclipseLink with MySQL database server (0.31) to the normalized speed of OpenJPA with Derby database server (3.6) reveals that in that case, OpenJPA with Derby server is 11.6 times faster than EclipseLink with MySQL server.

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

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 EclipseLink
MySQL server
OpenJPA
Derby server
EclipseLink
MySQL server
OpenJPA
Derby server
EclipseLink
MySQL server
OpenJPA
Derby server
Basic Person Test1.37.24.25.52.76.4
Element Collection Test0.690.840.891.50.791.2
Inheritance Test1.11.14.82.92.92.0
Indexing Test1.42.34.97.83.25.1
Graph (Binary Tree) Test0.850.270.730.410.790.34
Multithreading Test2.010.74.08.03.09.4
All Tests1.23.93.34.52.34.2

The results above show that in general OpenJPA with Derby server is more efficient than EclipseLink with MySQL server in performing JPA database operations.

A large performance gap has been detected when using simple basic entities with small transaction/retrieval size. Comparing the normalized speed of EclipseLink with MySQL database server (1.3) to the normalized speed of OpenJPA with Derby database server (7.2) reveals that in that case, OpenJPA with Derby server is 5.5 times faster than EclipseLink with MySQL server.

On the other hand, OpenJPA with Derby server is slower, for instance, when using graphs of objects with small transaction/retrieval size. Comparing the normalized speed of OpenJPA with Derby database server (0.27) to the normalized speed of EclipseLink with MySQL database server (0.85) reveals that in that case, OpenJPA with Derby server is 3.1 times slower than EclipseLink with MySQL server.

Other Head to Head DBMS/JPA Comparisons