Compare with

Comparison of OpenJPA with Derby embedded 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 embedded
EclipseLink
HSQLDB embedded
OpenJPA
Derby embedded
EclipseLink
HSQLDB embedded
OpenJPA
Derby embedded
EclipseLink
HSQLDB embedded
Basic Person Test4.827.12.917.23.922.2
Element Collection Test2.817.21.98.22.412.7
Inheritance Test4.126.72.411.93.319.3
Indexing Test6.130.64.118.65.124.6
Graph (Binary Tree) Test1.520.01.415.91.418.0
Multithreading Test8.732.53.311.46.022.0
All Tests4.725.72.713.93.719.8

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
 OpenJPA
Derby embedded
EclipseLink
HSQLDB embedded
OpenJPA
Derby embedded
EclipseLink
HSQLDB embedded
OpenJPA
Derby embedded
EclipseLink
HSQLDB embedded
Basic Person Test14.824.422.636.018.730.2
Element Collection Test0.003114.92.319.11.217.0
Inheritance Test0.01522.87.040.03.531.4
Indexing Test11.720.726.538.719.129.7
Graph (Binary Tree) Test0.938.71.214.21.111.4
Multithreading Test25.224.228.628.026.926.1
All Tests8.819.314.729.311.724.3

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
 OpenJPA
Derby embedded
EclipseLink
HSQLDB embedded
OpenJPA
Derby embedded
EclipseLink
HSQLDB embedded
OpenJPA
Derby embedded
EclipseLink
HSQLDB embedded
Basic Person Test49.72.99.90.8829.81.9
Element Collection Test2.73.29.61.46.12.3
Inheritance Test2.32.61.31.11.81.9
Indexing Test7.021.517.133.312.127.4
Multithreading Test40.91.111.70.5226.30.82
All Tests20.56.39.97.415.26.9

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
 OpenJPA
Derby embedded
EclipseLink
HSQLDB embedded
OpenJPA
Derby embedded
EclipseLink
HSQLDB embedded
OpenJPA
Derby embedded
EclipseLink
HSQLDB embedded
Basic Person Test5.617.95.27.05.412.5
Element Collection Test0.009014.62.28.31.111.4
Inheritance Test0.04516.24.69.72.313.0
Indexing Test6.112.08.76.87.49.4
Graph (Binary Tree) Test1.64.70.913.41.34.0
Multithreading Test18.324.44.54.411.414.4
All Tests5.315.04.46.64.810.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
 OpenJPA
Derby embedded
EclipseLink
HSQLDB embedded
OpenJPA
Derby embedded
EclipseLink
HSQLDB embedded
OpenJPA
Derby embedded
EclipseLink
HSQLDB embedded
Basic Person Test4.232.34.520.34.326.3
Element Collection Test0.007114.31.66.00.8010.2
Inheritance Test0.03529.23.023.91.526.6
Indexing Test5.355.33.627.14.441.2
Graph (Binary Tree) Test0.806.80.9314.10.8610.4
Multithreading Test5.752.96.228.46.040.6
All Tests2.731.83.320.03.025.9

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
 OpenJPA
Derby embedded
EclipseLink
HSQLDB embedded
OpenJPA
Derby embedded
EclipseLink
HSQLDB embedded
OpenJPA
Derby embedded
EclipseLink
HSQLDB embedded
Basic Person Test52.841.452.841.452.841.4
Element Collection Test42.446.942.446.942.446.9
Inheritance Test44.241.444.241.444.241.4
Indexing Test53.148.454.049.253.548.8
Graph (Binary Tree) Test12.828.59.621.411.225.0
Multithreading Test50.751.99.710.330.231.1
All Tests42.743.135.535.139.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
 OpenJPA
Derby embedded
EclipseLink
HSQLDB embedded
OpenJPA
Derby embedded
EclipseLink
HSQLDB embedded
OpenJPA
Derby embedded
EclipseLink
HSQLDB embedded
Basic Person Test15.820.99.016.312.418.6
Element Collection Test1.112.83.58.62.310.7
Inheritance Test1.319.53.717.32.518.4
Indexing Test7.228.012.024.99.626.5
Graph (Binary Tree) Test1.210.01.111.91.211.0
Multithreading Test19.827.010.914.615.320.8
All Tests8.020.16.915.77.417.9

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