Compare with

Comparison of EclipseLink with Derby embedded 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 embedded
OpenJPA
H2 embedded
EclipseLink
Derby embedded
OpenJPA
H2 embedded
EclipseLink
Derby embedded
OpenJPA
H2 embedded
Basic Person Test5.517.13.75.84.611.5
Element Collection Test3.010.91.74.92.47.9
Inheritance Test5.314.33.55.94.410.1
Indexing Test6.924.44.613.75.819.1
Graph (Binary Tree) Test2.06.81.96.71.96.7
Multithreading Test9.334.24.110.26.722.2
All Tests5.317.93.27.94.312.9

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

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
Derby embedded
OpenJPA
H2 embedded
EclipseLink
Derby embedded
OpenJPA
H2 embedded
EclipseLink
Derby embedded
OpenJPA
H2 embedded
Basic Person Test16.414.658.727.237.520.9
Element Collection Test7.50.004613.34.310.42.1
Inheritance Test17.10.01158.97.438.03.7
Indexing Test14.217.067.435.040.826.0
Graph (Binary Tree) Test2.81.05.71.44.21.2
Multithreading Test28.018.748.727.638.423.1
All Tests14.38.642.117.128.212.8

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

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
Derby embedded
OpenJPA
H2 embedded
EclipseLink
Derby embedded
OpenJPA
H2 embedded
EclipseLink
Derby embedded
OpenJPA
H2 embedded
Basic Person Test53.45.013.81.133.63.1
Element Collection Test37.91.74.41.321.21.5
Inheritance Test37.42.215.01.226.21.7
Indexing Test7.613.849.323.228.418.5
Multithreading Test41.21.46.10.6023.60.99
All Tests35.54.817.75.526.65.1

The results above show that in general EclipseLink with Derby embedded 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 embedded database (26.6) reveals that in these tests, EclipseLink with Derby embedded is 5.2 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 embedded database (41.2) reveals that in that case, EclipseLink with Derby embedded is 29.4 times faster 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 embedded
OpenJPA
H2 embedded
EclipseLink
Derby embedded
OpenJPA
H2 embedded
EclipseLink
Derby embedded
OpenJPA
H2 embedded
Basic Person Test6.410.06.76.06.58.0
Element Collection Test5.40.0116.23.85.81.9
Inheritance Test6.50.0469.25.07.82.5
Indexing Test7.38.911.17.09.28.0
Graph (Binary Tree) Test2.82.41.71.32.21.9
Multithreading Test21.316.65.04.313.110.4
All Tests8.36.36.64.67.55.4

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

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
Derby embedded
OpenJPA
H2 embedded
EclipseLink
Derby embedded
OpenJPA
H2 embedded
EclipseLink
Derby embedded
OpenJPA
H2 embedded
Basic Person Test4.618.34.711.14.614.7
Element Collection Test2.50.0121.42.91.91.4
Inheritance Test3.90.0304.56.64.23.3
Indexing Test6.223.23.89.75.016.4
Graph (Binary Tree) Test1.11.81.02.41.12.1
Multithreading Test6.231.25.817.36.024.2
All Tests4.112.43.58.33.810.4

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

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

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.012) to the normalized speed of EclipseLink with Derby embedded database (2.5) reveals that in that case, OpenJPA with H2 embedded is 208 times slower than EclipseLink with Derby embedded.

Comparison of database storage efficiency (normalized score, higher is better)

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
Derby embedded
OpenJPA
H2 embedded
EclipseLink
Derby embedded
OpenJPA
H2 embedded
EclipseLink
Derby embedded
OpenJPA
H2 embedded
Basic Person Test51.127.051.027.051.127.0
Element Collection Test38.530.639.430.638.930.6
Inheritance Test48.027.047.927.048.027.0
Indexing Test51.631.652.332.152.031.9
Graph (Binary Tree) Test13.428.511.721.412.624.9
Multithreading Test52.633.98.49.230.521.5
All Tests42.529.835.124.538.827.2

The results above show that in general EclipseLink with Derby embedded is more efficient than OpenJPA with H2 embedded in using disk space.

On the other hand, EclipseLink with Derby embedded is slower, for instance, when using graphs of objects with small transaction size. Comparing the normalized score of EclipseLink with Derby embedded database (13.4) to the normalized score of OpenJPA with H2 embedded database (28.5) reveals that in that case, EclipseLink with Derby embedded is 2.1 times less efficient than OpenJPA with H2 embedded.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 EclipseLink
Derby embedded
OpenJPA
H2 embedded
EclipseLink
Derby embedded
OpenJPA
H2 embedded
EclipseLink
Derby embedded
OpenJPA
H2 embedded
Basic Person Test17.313.017.510.217.411.6
Element Collection Test11.32.55.43.48.33.0
Inheritance Test14.03.318.25.216.14.3
Indexing Test8.417.527.217.717.817.6
Graph (Binary Tree) Test2.23.02.63.02.43.0
Multithreading Test21.220.413.912.017.616.2
All Tests12.710.214.58.813.69.5

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

A large performance gap has been detected 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 embedded database (11.3) reveals that in that case, EclipseLink with Derby embedded is 4.5 times faster than OpenJPA with H2 embedded.

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

Other Head to Head DBMS/JPA Comparisons