Compare with

Comparison of EclipseLink with Derby embedded vs OpenJPA 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
 EclipseLink
Derby embedded
OpenJPA
HSQLDB embedded
EclipseLink
Derby embedded
OpenJPA
HSQLDB embedded
EclipseLink
Derby embedded
OpenJPA
HSQLDB embedded
Basic Person Test5.513.33.76.94.610.1
Element Collection Test3.08.61.75.32.47.0
Inheritance Test5.312.23.55.84.49.0
Indexing Test6.916.74.69.15.812.9
Graph (Binary Tree) Test2.06.11.97.31.96.7
Multithreading Test9.326.84.17.06.716.9
All Tests5.313.93.26.94.310.4

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
 EclipseLink
Derby embedded
OpenJPA
HSQLDB embedded
EclipseLink
Derby embedded
OpenJPA
HSQLDB embedded
EclipseLink
Derby embedded
OpenJPA
HSQLDB embedded
Basic Person Test16.421.858.730.137.525.9
Element Collection Test7.50.006813.34.510.42.2
Inheritance Test17.10.002558.92.038.00.98
Indexing Test14.222.167.443.640.832.9
Graph (Binary Tree) Test2.82.15.72.14.22.1
Multithreading Test28.020.948.723.538.422.2
All Tests14.311.142.117.628.214.4

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
 EclipseLink
Derby embedded
OpenJPA
HSQLDB embedded
EclipseLink
Derby embedded
OpenJPA
HSQLDB embedded
EclipseLink
Derby embedded
OpenJPA
HSQLDB embedded
Basic Person Test53.42.813.80.9133.61.9
Element Collection Test37.91.44.40.9521.21.2
Inheritance Test37.42.415.01.326.21.8
Indexing Test7.615.449.334.328.424.9
Multithreading Test41.21.46.10.5323.60.95
All Tests35.54.717.77.626.66.1

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
 EclipseLink
Derby embedded
OpenJPA
HSQLDB embedded
EclipseLink
Derby embedded
OpenJPA
HSQLDB embedded
EclipseLink
Derby embedded
OpenJPA
HSQLDB embedded
Basic Person Test6.412.06.75.36.58.6
Element Collection Test5.40.0176.23.75.81.8
Inheritance Test6.50.00989.22.07.80.99
Indexing Test7.39.311.15.59.27.4
Graph (Binary Tree) Test2.82.51.71.62.22.1
Multithreading Test21.320.05.03.713.111.8
All Tests8.37.36.63.67.55.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
 EclipseLink
Derby embedded
OpenJPA
HSQLDB embedded
EclipseLink
Derby embedded
OpenJPA
HSQLDB embedded
EclipseLink
Derby embedded
OpenJPA
HSQLDB embedded
Basic Person Test4.621.34.715.74.618.5
Element Collection Test2.50.0111.42.91.91.5
Inheritance Test3.90.00704.53.54.21.8
Indexing Test6.228.83.815.25.022.0
Graph (Binary Tree) Test1.12.91.03.61.13.2
Multithreading Test6.226.05.819.66.022.8
All Tests4.113.23.510.13.811.6

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
 EclipseLink
Derby embedded
OpenJPA
HSQLDB embedded
EclipseLink
Derby embedded
OpenJPA
HSQLDB embedded
EclipseLink
Derby embedded
OpenJPA
HSQLDB embedded
Basic Person Test51.141.451.041.451.141.4
Element Collection Test38.546.939.446.938.946.9
Inheritance Test48.041.447.941.448.041.4
Indexing Test51.648.452.349.252.048.8
Graph (Binary Tree) Test13.428.511.721.412.625.0
Multithreading Test52.651.98.410.330.531.1
All Tests42.543.135.135.138.839.1

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
 EclipseLink
Derby embedded
OpenJPA
HSQLDB embedded
EclipseLink
Derby embedded
OpenJPA
HSQLDB embedded
EclipseLink
Derby embedded
OpenJPA
HSQLDB embedded
Basic Person Test17.314.317.511.817.413.0
Element Collection Test11.32.05.43.58.32.7
Inheritance Test14.02.918.22.916.12.9
Indexing Test8.418.527.221.617.820.0
Graph (Binary Tree) Test2.23.42.63.72.43.5
Multithreading Test21.219.013.910.917.614.9
All Tests12.710.214.59.213.69.7

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