Compare with

Comparison of EclipseLink with Derby server vs OpenJPA with H2 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
Derby server
OpenJPA
H2 embedded
EclipseLink
Derby server
OpenJPA
H2 embedded
EclipseLink
Derby server
OpenJPA
H2 embedded
Basic Person Test3.817.13.15.83.411.5
Element Collection Test2.210.91.54.91.87.9
Inheritance Test3.914.32.95.93.410.1
Indexing Test5.224.44.313.74.719.1
Graph (Binary Tree) Test1.96.81.76.71.86.7
Multithreading Test6.134.23.910.25.022.2
All Tests3.817.92.97.93.412.9

The results above show that in general OpenJPA with H2 embedded is much more efficient than EclipseLink with Derby server in persisting JPA entity objects to the database. Comparing the normalized speed of EclipseLink with Derby database server (3.4) to the normalized speed of OpenJPA with H2 embedded database (12.9) reveals that in these tests, OpenJPA with H2 embedded is 3.8 times faster than EclipseLink with Derby server.

A large performance gap has been detected when using multithreading with small transaction size. Comparing the normalized speed of EclipseLink with Derby database server (6.1) to the normalized speed of OpenJPA with H2 embedded database (34.2) reveals that in that case, OpenJPA with H2 embedded is 5.6 times faster than EclipseLink with Derby server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
Derby server
OpenJPA
H2 embedded
EclipseLink
Derby server
OpenJPA
H2 embedded
EclipseLink
Derby server
OpenJPA
H2 embedded
Basic Person Test6.414.611.327.28.820.9
Element Collection Test1.80.00462.44.32.12.1
Inheritance Test3.70.01112.97.48.33.7
Indexing Test3.617.012.835.08.226.0
Graph (Binary Tree) Test0.611.00.731.40.671.2
Multithreading Test8.518.719.827.614.123.1
All Tests4.18.610.017.17.012.8

The results above show that in general OpenJPA with H2 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 H2 embedded database (17.0) reveals that in that case, OpenJPA with H2 embedded is 4.7 times faster than EclipseLink with Derby server.

On the other hand, OpenJPA with H2 embedded is slower, for instance, when using JPA element collections with small retrieval size. Comparing the normalized speed of OpenJPA with H2 embedded database (0.0046) to the normalized speed of EclipseLink with Derby database server (1.8) reveals that in that case, OpenJPA with H2 embedded is 391 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
 EclipseLink
Derby server
OpenJPA
H2 embedded
EclipseLink
Derby server
OpenJPA
H2 embedded
EclipseLink
Derby server
OpenJPA
H2 embedded
Basic Person Test45.85.05.31.125.63.1
Element Collection Test35.21.70.991.318.11.5
Inheritance Test23.12.25.91.214.51.7
Indexing Test2.513.812.223.27.418.5
Multithreading Test34.31.47.70.6021.00.99
All Tests28.24.86.45.517.35.1

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

A huge performance gap has been detected when using multithreading with small retrieval size. Comparing the normalized speed of OpenJPA with H2 embedded database (1.4) to the normalized speed of EclipseLink with Derby database server (34.3) reveals that in that case, EclipseLink with Derby server is 24.5 times faster than OpenJPA with H2 embedded.

On the other hand, EclipseLink with Derby server is slower, for instance, when using database indexes with small retrieval size. Comparing the normalized speed of EclipseLink with Derby database server (2.5) to the normalized speed of OpenJPA with H2 embedded database (13.8) reveals that in that case, EclipseLink with Derby server is 5.5 times slower than OpenJPA with H2 embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
Derby server
OpenJPA
H2 embedded
EclipseLink
Derby server
OpenJPA
H2 embedded
EclipseLink
Derby server
OpenJPA
H2 embedded
Basic Person Test3.910.04.46.04.18.0
Element Collection Test1.70.0111.63.81.61.9
Inheritance Test4.60.0466.15.05.32.5
Indexing Test4.58.97.67.06.18.0
Graph (Binary Tree) Test0.702.40.421.30.561.9
Multithreading Test7.316.64.84.36.010.4
All Tests3.86.34.24.64.05.4

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

A large performance gap has been detected when using graphs of objects with small transaction size. Comparing the normalized speed of EclipseLink with Derby database server (0.70) to the normalized speed of OpenJPA with H2 embedded database (2.4) reveals that in that case, OpenJPA with H2 embedded is 3.4 times faster than EclipseLink with Derby server.

On the other hand, OpenJPA with H2 embedded is slower, for instance, when using JPA element collections with small transaction size. Comparing the normalized speed of OpenJPA with H2 embedded database (0.011) to the normalized speed of EclipseLink with Derby database server (1.7) reveals that in that case, OpenJPA with H2 embedded is 155 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
 EclipseLink
Derby server
OpenJPA
H2 embedded
EclipseLink
Derby server
OpenJPA
H2 embedded
EclipseLink
Derby server
OpenJPA
H2 embedded
Basic Person Test2.818.33.911.13.314.7
Element Collection Test1.20.0120.552.90.871.4
Inheritance Test3.30.0303.76.63.53.3
Indexing Test4.923.23.59.74.216.4
Graph (Binary Tree) Test0.511.80.502.40.512.1
Multithreading Test4.831.25.717.35.324.2
All Tests2.912.43.08.33.010.4

The results above show that in general OpenJPA with H2 embedded is much more efficient than EclipseLink with Derby server in deleting JPA entity objects from the database. Comparing the normalized speed of EclipseLink with Derby database server (3.0) to the normalized speed of OpenJPA with H2 embedded database (10.4) reveals that in these tests, OpenJPA with H2 embedded is 3.5 times faster than EclipseLink with Derby server.

A large performance gap has been detected when using simple basic entities with small transaction size. Comparing the normalized speed of EclipseLink with Derby database server (2.8) to the normalized speed of OpenJPA with H2 embedded database (18.3) reveals that in that case, OpenJPA with H2 embedded is 6.5 times faster than EclipseLink with Derby server.

On the other hand, OpenJPA with H2 embedded is slower, for instance, when using class inheritance in the object model with small transaction size. Comparing the normalized speed of OpenJPA with H2 embedded database (0.030) to the normalized speed of EclipseLink with Derby database server (3.3) reveals that in that case, OpenJPA with H2 embedded is 110 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
 EclipseLink
Derby server
OpenJPA
H2 embedded
EclipseLink
Derby server
OpenJPA
H2 embedded
EclipseLink
Derby server
OpenJPA
H2 embedded
Basic Person Test12.513.05.610.29.111.6
Element Collection Test8.42.51.43.44.93.0
Inheritance Test7.73.36.35.27.04.3
Indexing Test4.117.58.117.76.117.6
Graph (Binary Tree) Test0.933.00.833.00.883.0
Multithreading Test12.220.48.412.010.316.2
All Tests7.910.25.28.86.69.5

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

A large performance gap has been detected when using database indexes with small transaction/retrieval size. Comparing the normalized speed of EclipseLink with Derby database server (4.1) to the normalized speed of OpenJPA with H2 embedded database (17.5) reveals that in that case, OpenJPA with H2 embedded is 4.3 times faster than EclipseLink with Derby server.

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

Other Head to Head DBMS/JPA Comparisons