Compare with

Comparison of EclipseLink with HSQLDB embedded vs OpenJPA 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
 EclipseLink
HSQLDB embedded
OpenJPA
Derby embedded
EclipseLink
HSQLDB embedded
OpenJPA
Derby embedded
EclipseLink
HSQLDB embedded
OpenJPA
Derby embedded
Basic Person Test27.14.817.22.922.23.9
Element Collection Test17.22.88.21.912.72.4
Inheritance Test26.74.111.92.419.33.3
Indexing Test30.66.118.64.124.65.1
Graph (Binary Tree) Test20.01.515.91.418.01.4
Multithreading Test32.58.711.43.322.06.0
All Tests25.74.713.92.719.83.7

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

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
HSQLDB embedded
OpenJPA
Derby embedded
EclipseLink
HSQLDB embedded
OpenJPA
Derby embedded
EclipseLink
HSQLDB embedded
OpenJPA
Derby embedded
Basic Person Test24.414.836.022.630.218.7
Element Collection Test14.90.003119.12.317.01.2
Inheritance Test22.80.01540.07.031.43.5
Indexing Test20.711.738.726.529.719.1
Graph (Binary Tree) Test8.70.9314.21.211.41.1
Multithreading Test24.225.228.028.626.126.9
All Tests19.38.829.314.724.311.7

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

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
HSQLDB embedded
OpenJPA
Derby embedded
EclipseLink
HSQLDB embedded
OpenJPA
Derby embedded
EclipseLink
HSQLDB embedded
OpenJPA
Derby embedded
Basic Person Test2.949.70.889.91.929.8
Element Collection Test3.22.71.49.62.36.1
Inheritance Test2.62.31.11.31.91.8
Indexing Test21.57.033.317.127.412.1
Multithreading Test1.140.90.5211.70.8226.3
All Tests6.320.57.49.96.915.2

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

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 embedded database (40.9) reveals that in that case, OpenJPA with Derby embedded is 37.2 times faster than EclipseLink with HSQLDB embedded.

On the other hand, OpenJPA with Derby embedded is slower, for instance, when using database indexes with small retrieval size. Comparing the normalized speed of OpenJPA with Derby embedded database (7.0) to the normalized speed of EclipseLink with HSQLDB embedded database (21.5) reveals that in that case, OpenJPA with Derby embedded is 3.1 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
 EclipseLink
HSQLDB embedded
OpenJPA
Derby embedded
EclipseLink
HSQLDB embedded
OpenJPA
Derby embedded
EclipseLink
HSQLDB embedded
OpenJPA
Derby embedded
Basic Person Test17.95.67.05.212.55.4
Element Collection Test14.60.00908.32.211.41.1
Inheritance Test16.20.0459.74.613.02.3
Indexing Test12.06.16.88.79.47.4
Graph (Binary Tree) Test4.71.63.40.914.01.3
Multithreading Test24.418.34.44.514.411.4
All Tests15.05.36.64.410.84.8

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

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
HSQLDB embedded
OpenJPA
Derby embedded
EclipseLink
HSQLDB embedded
OpenJPA
Derby embedded
EclipseLink
HSQLDB embedded
OpenJPA
Derby embedded
Basic Person Test32.34.220.34.526.34.3
Element Collection Test14.30.00716.01.610.20.80
Inheritance Test29.20.03523.93.026.61.5
Indexing Test55.35.327.13.641.24.4
Graph (Binary Tree) Test6.80.8014.10.9310.40.86
Multithreading Test52.95.728.46.240.66.0
All Tests31.82.720.03.325.93.0

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

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
HSQLDB embedded
OpenJPA
Derby embedded
EclipseLink
HSQLDB embedded
OpenJPA
Derby embedded
EclipseLink
HSQLDB embedded
OpenJPA
Derby embedded
Basic Person Test41.452.841.452.841.452.8
Element Collection Test46.942.446.942.446.942.4
Inheritance Test41.444.241.444.241.444.2
Indexing Test48.453.149.254.048.853.5
Graph (Binary Tree) Test28.512.821.49.625.011.2
Multithreading Test51.950.710.39.731.130.2
All Tests43.142.735.135.539.139.1

The results above show that in general EclipseLink with HSQLDB embedded is equivalent to OpenJPA with Derby embedded in using disk space.

A large gap has been detected when using graphs of objects with large transaction size. Comparing the normalized score of OpenJPA with Derby embedded database (9.6) to the normalized score of EclipseLink with HSQLDB embedded database (21.4) reveals that in that case, EclipseLink with HSQLDB embedded is 2.2 times more efficient than OpenJPA with Derby embedded.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 EclipseLink
HSQLDB embedded
OpenJPA
Derby embedded
EclipseLink
HSQLDB embedded
OpenJPA
Derby embedded
EclipseLink
HSQLDB embedded
OpenJPA
Derby embedded
Basic Person Test20.915.816.39.018.612.4
Element Collection Test12.81.18.63.510.72.3
Inheritance Test19.51.317.33.718.42.5
Indexing Test28.07.224.912.026.59.6
Graph (Binary Tree) Test10.01.211.91.111.01.2
Multithreading Test27.019.814.610.920.815.3
All Tests20.18.015.76.917.97.4

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

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

Other Head to Head DBMS/JPA Comparisons