Compare with

Comparison of EclipseLink with Derby embedded vs OpenJPA with H2 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
Derby embedded
OpenJPA
H2 server
EclipseLink
Derby embedded
OpenJPA
H2 server
EclipseLink
Derby embedded
OpenJPA
H2 server
Basic Person Test5.53.73.72.24.62.9
Element Collection Test3.02.61.71.52.42.1
Inheritance Test5.34.53.52.04.43.2
Indexing Test6.97.34.63.65.85.4
Graph (Binary Tree) Test2.01.11.90.841.90.97
Multithreading Test9.37.74.14.26.75.9
All Tests5.34.53.22.44.33.4

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

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
Derby embedded
OpenJPA
H2 server
EclipseLink
Derby embedded
OpenJPA
H2 server
EclipseLink
Derby embedded
OpenJPA
H2 server
Basic Person Test16.42.958.77.637.55.2
Element Collection Test7.50.002213.31.910.40.93
Inheritance Test17.10.01358.94.038.02.0
Indexing Test14.24.167.48.840.86.5
Graph (Binary Tree) Test2.80.385.70.494.20.44
Multithreading Test28.05.948.714.038.410.0
All Tests14.32.242.16.128.24.2

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

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
Derby embedded
OpenJPA
H2 server
EclipseLink
Derby embedded
OpenJPA
H2 server
EclipseLink
Derby embedded
OpenJPA
H2 server
Basic Person Test53.43.713.81.033.62.4
Element Collection Test37.92.04.41.221.21.6
Inheritance Test37.42.815.01.126.22.0
Indexing Test7.63.849.37.528.45.7
Multithreading Test41.20.986.11.023.61.0
All Tests35.52.717.72.426.62.5

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

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
Derby embedded
OpenJPA
H2 server
EclipseLink
Derby embedded
OpenJPA
H2 server
EclipseLink
Derby embedded
OpenJPA
H2 server
Basic Person Test6.43.06.72.06.52.5
Element Collection Test5.40.00786.21.95.80.94
Inheritance Test6.50.0349.22.87.81.4
Indexing Test7.32.811.13.29.23.0
Graph (Binary Tree) Test2.80.791.70.432.20.61
Multithreading Test21.37.05.02.513.14.8
All Tests8.32.36.62.17.52.2

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

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
Derby embedded
OpenJPA
H2 server
EclipseLink
Derby embedded
OpenJPA
H2 server
EclipseLink
Derby embedded
OpenJPA
H2 server
Basic Person Test4.63.24.72.24.62.7
Element Collection Test2.50.00601.40.881.90.44
Inheritance Test3.90.0304.53.14.21.6
Indexing Test6.26.53.83.65.05.1
Graph (Binary Tree) Test1.10.731.00.751.10.74
Multithreading Test6.27.65.85.26.06.4
All Tests4.13.03.52.63.82.8

The results above show that in general EclipseLink with Derby embedded is more efficient than OpenJPA with H2 server in deleting JPA entity objects from 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 database server (0.0060) to the normalized speed of EclipseLink with Derby embedded database (2.5) reveals that in that case, EclipseLink with Derby embedded is 417 times faster than OpenJPA with H2 server.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 EclipseLink
Derby embedded
OpenJPA
H2 server
EclipseLink
Derby embedded
OpenJPA
H2 server
EclipseLink
Derby embedded
OpenJPA
H2 server
Basic Person Test17.33.317.53.017.43.1
Element Collection Test11.30.935.41.58.31.2
Inheritance Test14.01.518.22.616.12.0
Indexing Test8.44.927.25.417.85.1
Graph (Binary Tree) Test2.20.752.60.632.40.69
Multithreading Test21.25.913.95.417.65.6
All Tests12.72.914.53.213.63.0

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

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

Other Head to Head DBMS/JPA Comparisons