Compare with

Comparison of OpenJPA with HSQLDB embedded vs EclipseLink with Derby 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
HSQLDB embedded
EclipseLink
Derby embedded
OpenJPA
HSQLDB embedded
EclipseLink
Derby embedded
OpenJPA
HSQLDB embedded
EclipseLink
Derby embedded
Basic Person Test13.35.56.93.710.14.6
Element Collection Test8.63.05.31.77.02.4
Inheritance Test12.25.35.83.59.04.4
Indexing Test16.76.99.14.612.95.8
Graph (Binary Tree) Test6.12.07.31.96.71.9
Multithreading Test26.89.37.04.116.96.7
All Tests13.95.36.93.210.44.3

The results above show that in general OpenJPA with HSQLDB embedded is 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 HSQLDB embedded database (10.4) reveals that in these tests, OpenJPA with HSQLDB embedded is 2.4 times faster than EclipseLink with Derby embedded.

A large performance gap has been detected when using graphs of objects with large transaction size. Comparing the normalized speed of EclipseLink with Derby embedded database (1.9) to the normalized speed of OpenJPA with HSQLDB embedded database (7.3) reveals that in that case, OpenJPA with HSQLDB embedded is 3.8 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
 OpenJPA
HSQLDB embedded
EclipseLink
Derby embedded
OpenJPA
HSQLDB embedded
EclipseLink
Derby embedded
OpenJPA
HSQLDB embedded
EclipseLink
Derby embedded
Basic Person Test21.816.430.158.725.937.5
Element Collection Test0.00687.54.513.32.210.4
Inheritance Test0.002517.12.058.90.9838.0
Indexing Test22.114.243.667.432.940.8
Graph (Binary Tree) Test2.12.82.15.72.14.2
Multithreading Test20.928.023.548.722.238.4
All Tests11.114.317.642.114.428.2

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

A huge performance gap has been detected when using class inheritance in the object model with small retrieval size. Comparing the normalized speed of OpenJPA with HSQLDB embedded database (0.0025) to the normalized speed of EclipseLink with Derby embedded database (17.1) reveals that in that case, EclipseLink with Derby embedded is 6,840 times faster than OpenJPA with HSQLDB embedded.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
HSQLDB embedded
EclipseLink
Derby embedded
OpenJPA
HSQLDB embedded
EclipseLink
Derby embedded
OpenJPA
HSQLDB embedded
EclipseLink
Derby embedded
Basic Person Test2.853.40.9113.81.933.6
Element Collection Test1.437.90.954.41.221.2
Inheritance Test2.437.41.315.01.826.2
Indexing Test15.47.634.349.324.928.4
Multithreading Test1.441.20.536.10.9523.6
All Tests4.735.57.617.76.126.6

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

A huge performance gap has been detected when using multithreading with small retrieval size. Comparing the normalized speed of OpenJPA with HSQLDB 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 HSQLDB embedded.

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
HSQLDB embedded
EclipseLink
Derby embedded
OpenJPA
HSQLDB embedded
EclipseLink
Derby embedded
OpenJPA
HSQLDB embedded
EclipseLink
Derby embedded
Basic Person Test12.06.45.36.78.66.5
Element Collection Test0.0175.43.76.21.85.8
Inheritance Test0.00986.52.09.20.997.8
Indexing Test9.37.35.511.17.49.2
Graph (Binary Tree) Test2.52.81.61.72.12.2
Multithreading Test20.021.33.75.011.813.1
All Tests7.38.33.66.65.57.5

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

A huge performance gap has been detected when using class inheritance in the object model with small transaction size. Comparing the normalized speed of OpenJPA with HSQLDB embedded database (0.0098) to the normalized speed of EclipseLink with Derby embedded database (6.5) reveals that in that case, EclipseLink with Derby embedded is 663 times faster than OpenJPA with HSQLDB embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
HSQLDB embedded
EclipseLink
Derby embedded
OpenJPA
HSQLDB embedded
EclipseLink
Derby embedded
OpenJPA
HSQLDB embedded
EclipseLink
Derby embedded
Basic Person Test21.34.615.74.718.54.6
Element Collection Test0.0112.52.91.41.51.9
Inheritance Test0.00703.93.54.51.84.2
Indexing Test28.86.215.23.822.05.0
Graph (Binary Tree) Test2.91.13.61.03.21.1
Multithreading Test26.06.219.65.822.86.0
All Tests13.24.110.13.511.63.8

The results above show that in general OpenJPA with HSQLDB embedded is much 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 HSQLDB embedded database (11.6) reveals that in these tests, OpenJPA with HSQLDB embedded is 3.1 times faster than EclipseLink with Derby embedded.

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

On the other hand, OpenJPA with HSQLDB embedded is slower, for instance, when using class inheritance in the object model with small transaction size. Comparing the normalized speed of OpenJPA with HSQLDB embedded database (0.0070) to the normalized speed of EclipseLink with Derby embedded database (3.9) reveals that in that case, OpenJPA with HSQLDB embedded is 557 times slower than EclipseLink with Derby embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
HSQLDB embedded
EclipseLink
Derby embedded
OpenJPA
HSQLDB embedded
EclipseLink
Derby embedded
OpenJPA
HSQLDB embedded
EclipseLink
Derby embedded
Basic Person Test41.451.141.451.041.451.1
Element Collection Test46.938.546.939.446.938.9
Inheritance Test41.448.041.447.941.448.0
Indexing Test48.451.649.252.348.852.0
Graph (Binary Tree) Test28.513.421.411.725.012.6
Multithreading Test51.952.610.38.431.130.5
All Tests43.142.535.135.139.138.8

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

A large gap has been detected 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 HSQLDB embedded database (28.5) reveals that in that case, OpenJPA with HSQLDB embedded is 2.1 times more efficient than EclipseLink with Derby embedded.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 OpenJPA
HSQLDB embedded
EclipseLink
Derby embedded
OpenJPA
HSQLDB embedded
EclipseLink
Derby embedded
OpenJPA
HSQLDB embedded
EclipseLink
Derby embedded
Basic Person Test14.317.311.817.513.017.4
Element Collection Test2.011.33.55.42.78.3
Inheritance Test2.914.02.918.22.916.1
Indexing Test18.58.421.627.220.017.8
Graph (Binary Tree) Test3.42.23.72.63.52.4
Multithreading Test19.021.210.913.914.917.6
All Tests10.212.79.214.59.713.6

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

A large performance gap has been detected when using class inheritance in the object model with large transaction/retrieval size. Comparing the normalized speed of OpenJPA with HSQLDB embedded database (2.9) to the normalized speed of EclipseLink with Derby embedded database (18.2) reveals that in that case, EclipseLink with Derby embedded is 6.3 times faster than OpenJPA with HSQLDB 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 HSQLDB embedded database (18.5) reveals that in that case, EclipseLink with Derby embedded is 2.2 times slower than OpenJPA with HSQLDB embedded.

Other Head to Head DBMS/JPA Comparisons