Compare with

Comparison of OpenJPA with Derby embedded vs EclipseLink 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
 OpenJPA
Derby embedded
EclipseLink
Derby server
OpenJPA
Derby embedded
EclipseLink
Derby server
OpenJPA
Derby embedded
EclipseLink
Derby server
Basic Person Test4.83.82.93.13.93.4
Element Collection Test2.82.21.91.52.41.8
Inheritance Test4.13.92.42.93.33.4
Indexing Test6.15.24.14.35.14.7
Graph (Binary Tree) Test1.51.91.41.71.41.8
Multithreading Test8.76.13.33.96.05.0
All Tests4.73.82.72.93.73.4

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
Derby embedded
EclipseLink
Derby server
OpenJPA
Derby embedded
EclipseLink
Derby server
OpenJPA
Derby embedded
EclipseLink
Derby server
Basic Person Test14.86.422.611.318.78.8
Element Collection Test0.00311.82.32.41.22.1
Inheritance Test0.0153.77.012.93.58.3
Indexing Test11.73.626.512.819.18.2
Graph (Binary Tree) Test0.930.611.20.731.10.67
Multithreading Test25.28.528.619.826.914.1
All Tests8.84.114.710.011.77.0

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

A large performance gap has been detected when using database indexes with small retrieval size. Comparing the normalized speed of EclipseLink with Derby database server (3.6) to the normalized speed of OpenJPA with Derby embedded database (11.7) reveals that in that case, OpenJPA with Derby embedded is 3.2 times faster than EclipseLink with Derby 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 Derby database server (1.8) reveals that in that case, OpenJPA with Derby embedded is 581 times slower than EclipseLink with Derby server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
Derby embedded
EclipseLink
Derby server
OpenJPA
Derby embedded
EclipseLink
Derby server
OpenJPA
Derby embedded
EclipseLink
Derby server
Basic Person Test49.745.89.95.329.825.6
Element Collection Test2.735.29.60.996.118.1
Inheritance Test2.323.11.35.91.814.5
Indexing Test7.02.517.112.212.17.4
Multithreading Test40.934.311.77.726.321.0
All Tests20.528.29.96.415.217.3

The results above show that in general EclipseLink with Derby server is slightly more efficient than OpenJPA with Derby embedded in executing the tested JPA queries.

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

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
Derby embedded
EclipseLink
Derby server
OpenJPA
Derby embedded
EclipseLink
Derby server
OpenJPA
Derby embedded
EclipseLink
Derby server
Basic Person Test5.63.95.24.45.44.1
Element Collection Test0.00901.72.21.61.11.6
Inheritance Test0.0454.64.66.12.35.3
Indexing Test6.14.58.77.67.46.1
Graph (Binary Tree) Test1.60.700.910.421.30.56
Multithreading Test18.37.34.54.811.46.0
All Tests5.33.84.44.24.84.0

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

A large performance gap has been detected when using multithreading with small transaction size. Comparing the normalized speed of EclipseLink with Derby database server (7.3) to the normalized speed of OpenJPA with Derby embedded database (18.3) reveals that in that case, OpenJPA with Derby embedded is 2.5 times faster than EclipseLink with Derby 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 Derby database server (1.7) reveals that in that case, OpenJPA with Derby embedded is 189 times slower than EclipseLink with Derby server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
Derby embedded
EclipseLink
Derby server
OpenJPA
Derby embedded
EclipseLink
Derby server
OpenJPA
Derby embedded
EclipseLink
Derby server
Basic Person Test4.22.84.53.94.33.3
Element Collection Test0.00711.21.60.550.800.87
Inheritance Test0.0353.33.03.71.53.5
Indexing Test5.34.93.63.54.44.2
Graph (Binary Tree) Test0.800.510.930.500.860.51
Multithreading Test5.74.86.25.76.05.3
All Tests2.72.93.33.03.03.0

The results above show that in general OpenJPA with Derby embedded is equivalent to EclipseLink with Derby server in deleting JPA entity objects from 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 Derby database server (0.55) to the normalized speed of OpenJPA with Derby embedded database (1.6) reveals that in that case, OpenJPA with Derby embedded is 2.9 times faster than EclipseLink with Derby 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 Derby database server (1.2) reveals that in that case, OpenJPA with Derby embedded is 169 times slower than EclipseLink with Derby server.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 OpenJPA
Derby embedded
EclipseLink
Derby server
OpenJPA
Derby embedded
EclipseLink
Derby server
OpenJPA
Derby embedded
EclipseLink
Derby server
Basic Person Test15.812.59.05.612.49.1
Element Collection Test1.18.43.51.42.34.9
Inheritance Test1.37.73.76.32.57.0
Indexing Test7.24.112.08.19.66.1
Graph (Binary Tree) Test1.20.931.10.831.20.88
Multithreading Test19.812.210.98.415.310.3
All Tests8.07.96.95.27.46.6

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

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

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

Other Head to Head DBMS/JPA Comparisons