Compare with

Comparison of EclipseLink with MySQL server vs OpenJPA 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
 EclipseLink
MySQL server
OpenJPA
Derby embedded
EclipseLink
MySQL server
OpenJPA
Derby embedded
EclipseLink
MySQL server
OpenJPA
Derby embedded
Basic Person Test3.64.81.52.92.63.9
Element Collection Test1.52.80.691.91.12.4
Inheritance Test3.54.11.42.42.43.3
Indexing Test5.36.12.54.13.95.1
Graph (Binary Tree) Test1.71.51.31.41.51.4
Multithreading Test7.28.72.43.34.86.0
All Tests3.84.71.62.72.73.7

The results above show that in general OpenJPA with Derby embedded is 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 embedded database (1.9) reveals that in that case, OpenJPA with Derby embedded is 2.8 times faster 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 embedded
EclipseLink
MySQL server
OpenJPA
Derby embedded
EclipseLink
MySQL server
OpenJPA
Derby embedded
Basic Person Test0.4314.815.522.68.018.7
Element Collection Test0.160.00311.42.30.781.2
Inheritance Test0.390.01517.67.09.03.5
Indexing Test0.4311.716.626.58.519.1
Graph (Binary Tree) Test0.530.930.761.20.651.1
Multithreading Test0.1925.211.028.65.626.9
All Tests0.358.810.514.75.411.7

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

A huge performance gap has been detected 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 embedded database (25.2) reveals that in that case, OpenJPA with Derby embedded is 133 times faster than EclipseLink with MySQL server.

On the other hand, OpenJPA with Derby embedded is slower, for instance, when using JPA element collections with small retrieval size. Comparing the normalized speed of OpenJPA with Derby embedded database (0.0031) to the normalized speed of EclipseLink with MySQL database server (0.16) reveals that in that case, OpenJPA with Derby embedded is 51.6 times slower than EclipseLink with MySQL server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
MySQL server
OpenJPA
Derby embedded
EclipseLink
MySQL server
OpenJPA
Derby embedded
EclipseLink
MySQL server
OpenJPA
Derby embedded
Basic Person Test1.549.70.449.90.9529.8
Element Collection Test1.42.70.439.60.926.1
Inheritance Test1.12.30.611.30.861.8
Indexing Test0.267.00.5217.10.3912.1
Multithreading Test1.940.90.7211.71.326.3
All Tests1.220.50.549.90.8815.2

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

A huge performance gap has been detected when using simple basic entities with small retrieval size. Comparing the normalized speed of EclipseLink with MySQL database server (1.5) to the normalized speed of OpenJPA with Derby embedded database (49.7) reveals that in that case, OpenJPA with Derby embedded is 33.1 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 embedded
EclipseLink
MySQL server
OpenJPA
Derby embedded
EclipseLink
MySQL server
OpenJPA
Derby embedded
Basic Person Test0.395.61.85.21.15.4
Element Collection Test0.230.00901.42.20.831.1
Inheritance Test0.420.0452.64.61.52.3
Indexing Test0.466.13.18.71.87.4
Graph (Binary Tree) Test0.671.60.410.910.541.3
Multithreading Test0.4818.32.64.51.511.4
All Tests0.445.32.04.41.24.8

The results above show that in general OpenJPA with Derby embedded is much 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 embedded database (4.8) reveals that in these tests, OpenJPA with Derby embedded is 4.0 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 embedded database (18.3) reveals that in that case, OpenJPA with Derby embedded is 38.1 times faster than EclipseLink with MySQL server.

On the other hand, OpenJPA with Derby embedded is slower, for instance, when using JPA element collections with small transaction size. Comparing the normalized speed of OpenJPA with Derby embedded database (0.0090) to the normalized speed of EclipseLink with MySQL database server (0.23) reveals that in that case, OpenJPA with Derby embedded is 25.6 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 embedded
EclipseLink
MySQL server
OpenJPA
Derby embedded
EclipseLink
MySQL server
OpenJPA
Derby embedded
Basic Person Test0.354.21.74.51.04.3
Element Collection Test0.110.00710.511.60.310.80
Inheritance Test0.290.0351.63.00.941.5
Indexing Test0.465.31.93.61.24.4
Graph (Binary Tree) Test0.540.800.490.930.510.86
Multithreading Test0.315.73.66.21.96.0
All Tests0.342.71.63.30.983.0

The results above show that in general OpenJPA with Derby embedded is much more efficient than EclipseLink with MySQL server in deleting JPA entity objects from the database. Comparing the normalized speed of EclipseLink with MySQL database server (0.98) to the normalized speed of OpenJPA with Derby embedded database (3.0) reveals that in these tests, OpenJPA with Derby embedded is 3.1 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.31) to the normalized speed of OpenJPA with Derby embedded database (5.7) reveals that in that case, OpenJPA with Derby embedded is 18.4 times faster than EclipseLink with MySQL server.

On the other hand, OpenJPA with Derby embedded is slower, for instance, when using JPA element collections with small transaction size. Comparing the normalized speed of OpenJPA with Derby embedded database (0.0071) to the normalized speed of EclipseLink with MySQL database server (0.11) reveals that in that case, OpenJPA with Derby embedded is 15.5 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 embedded
EclipseLink
MySQL server
OpenJPA
Derby embedded
EclipseLink
MySQL server
OpenJPA
Derby embedded
Basic Person Test1.315.84.29.02.712.4
Element Collection Test0.691.10.893.50.792.3
Inheritance Test1.11.34.83.72.92.5
Indexing Test1.47.24.912.03.29.6
Graph (Binary Tree) Test0.851.20.731.10.791.2
Multithreading Test2.019.84.010.93.015.3
All Tests1.28.03.36.92.37.4

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

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

Other Head to Head DBMS/JPA Comparisons