Compare with

Comparison of OpenJPA with Derby server vs EclipseLink with HSQLDB 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
 OpenJPA
Derby server
EclipseLink
HSQLDB embedded
OpenJPA
Derby server
EclipseLink
HSQLDB embedded
OpenJPA
Derby server
EclipseLink
HSQLDB embedded
Basic Person Test3.127.12.717.22.922.2
Element Collection Test2.017.21.78.21.812.7
Inheritance Test3.026.72.311.92.619.3
Indexing Test4.730.64.118.64.424.6
Graph (Binary Tree) Test0.7120.00.6415.90.6718.0
Multithreading Test6.032.53.811.44.922.0
All Tests3.325.72.513.92.919.8

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

A huge performance gap has been detected when using graphs of objects with small transaction size. Comparing the normalized speed of OpenJPA with Derby database server (0.71) to the normalized speed of EclipseLink with HSQLDB embedded database (20.0) reveals that in that case, EclipseLink with HSQLDB embedded is 28.2 times faster than OpenJPA with Derby server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
Derby server
EclipseLink
HSQLDB embedded
OpenJPA
Derby server
EclipseLink
HSQLDB embedded
OpenJPA
Derby server
EclipseLink
HSQLDB embedded
Basic Person Test0.7824.411.636.06.230.2
Element Collection Test0.002414.91.119.10.5417.0
Inheritance Test0.01422.85.040.02.531.4
Indexing Test0.6220.713.038.76.829.7
Graph (Binary Tree) Test0.0658.70.3914.20.2311.4
Multithreading Test1.624.219.028.010.326.1
All Tests0.5119.38.429.34.424.3

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

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
Derby server
EclipseLink
HSQLDB embedded
OpenJPA
Derby server
EclipseLink
HSQLDB embedded
OpenJPA
Derby server
EclipseLink
HSQLDB embedded
Basic Person Test29.22.95.50.8817.31.9
Element Collection Test2.23.21.41.41.82.3
Inheritance Test2.22.61.01.11.61.9
Indexing Test2.221.511.733.37.027.4
Multithreading Test35.51.18.30.5221.90.82
All Tests14.36.35.67.49.96.9

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

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

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
Derby server
EclipseLink
HSQLDB embedded
OpenJPA
Derby server
EclipseLink
HSQLDB embedded
OpenJPA
Derby server
EclipseLink
HSQLDB embedded
Basic Person Test1.517.94.07.02.812.5
Element Collection Test0.008114.61.98.30.9411.4
Inheritance Test0.04316.23.89.71.913.0
Indexing Test1.812.06.86.84.39.4
Graph (Binary Tree) Test0.164.70.273.40.224.0
Multithreading Test6.924.45.04.45.914.4
All Tests1.715.03.66.62.710.8

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

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
Derby server
EclipseLink
HSQLDB embedded
OpenJPA
Derby server
EclipseLink
HSQLDB embedded
OpenJPA
Derby server
EclipseLink
HSQLDB embedded
Basic Person Test1.432.33.720.32.526.3
Element Collection Test0.008214.31.46.00.7110.2
Inheritance Test0.03529.22.523.91.326.6
Indexing Test2.355.33.527.12.941.2
Graph (Binary Tree) Test0.136.80.3514.10.2410.4
Multithreading Test3.652.94.028.43.840.6
All Tests1.331.82.620.01.925.9

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

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

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 OpenJPA
Derby server
EclipseLink
HSQLDB embedded
OpenJPA
Derby server
EclipseLink
HSQLDB embedded
OpenJPA
Derby server
EclipseLink
HSQLDB embedded
Basic Person Test7.220.95.516.36.418.6
Element Collection Test0.8412.81.58.61.210.7
Inheritance Test1.119.52.917.32.018.4
Indexing Test2.328.07.824.95.126.5
Graph (Binary Tree) Test0.2710.00.4111.90.3411.0
Multithreading Test10.727.08.014.69.420.8
All Tests3.920.14.515.74.217.9

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

A huge performance gap has been detected when using graphs of objects with small transaction/retrieval size. Comparing the normalized speed of OpenJPA with Derby database server (0.27) to the normalized speed of EclipseLink with HSQLDB embedded database (10.0) reveals that in that case, EclipseLink with HSQLDB embedded is 37.0 times faster than OpenJPA with Derby server.

Other Head to Head DBMS/JPA Comparisons