Compare with

Comparison of EclipseLink with HSQLDB embedded vs OpenJPA with MySQL server

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
MySQL server
EclipseLink
HSQLDB embedded
OpenJPA
MySQL server
EclipseLink
HSQLDB embedded
OpenJPA
MySQL server
Basic Person Test27.13.917.21.622.22.7
Element Collection Test17.21.68.20.6812.71.1
Inheritance Test26.73.611.91.419.32.5
Indexing Test30.65.618.62.424.64.0
Graph (Binary Tree) Test20.00.6815.90.5718.00.63
Multithreading Test32.57.211.42.722.04.9
All Tests25.73.713.91.519.82.6

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

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
HSQLDB embedded
OpenJPA
MySQL server
EclipseLink
HSQLDB embedded
OpenJPA
MySQL server
EclipseLink
HSQLDB embedded
OpenJPA
MySQL server
Basic Person Test24.43.236.022.730.212.9
Element Collection Test14.90.003819.12.917.01.4
Inheritance Test22.80.01740.06.931.43.4
Indexing Test20.72.438.723.429.712.9
Graph (Binary Tree) Test8.70.2714.20.3511.40.31
Multithreading Test24.20.1428.018.126.19.1
All Tests19.31.029.312.424.36.7

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

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
HSQLDB embedded
OpenJPA
MySQL server
EclipseLink
HSQLDB embedded
OpenJPA
MySQL server
EclipseLink
HSQLDB embedded
OpenJPA
MySQL server
Basic Person Test2.99.30.882.21.95.8
Element Collection Test3.24.81.41.12.32.9
Inheritance Test2.61.51.10.901.91.2
Indexing Test21.50.3133.32.127.41.2
Multithreading Test1.11.90.520.990.821.4
All Tests6.33.67.41.56.92.5

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

A huge performance gap has been detected when using database indexes with small retrieval size. Comparing the normalized speed of OpenJPA with MySQL database server (0.31) to the normalized speed of EclipseLink with HSQLDB embedded database (21.5) reveals that in that case, EclipseLink with HSQLDB embedded is 69.4 times faster than OpenJPA with MySQL server.

On the other hand, EclipseLink with HSQLDB embedded is slower, for instance, when using simple basic entities with small retrieval size. Comparing the normalized speed of EclipseLink with HSQLDB embedded database (2.9) to the normalized speed of OpenJPA with MySQL database server (9.3) reveals that in that case, EclipseLink with HSQLDB embedded is 3.2 times slower than OpenJPA with MySQL server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
HSQLDB embedded
OpenJPA
MySQL server
EclipseLink
HSQLDB embedded
OpenJPA
MySQL server
EclipseLink
HSQLDB embedded
OpenJPA
MySQL server
Basic Person Test17.90.747.01.612.51.2
Element Collection Test14.60.0148.31.711.40.87
Inheritance Test16.20.0489.72.013.01.0
Indexing Test12.00.746.83.09.41.9
Graph (Binary Tree) Test4.70.453.40.254.00.35
Multithreading Test24.40.554.42.914.41.7
All Tests15.00.426.61.910.81.2

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

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
HSQLDB embedded
OpenJPA
MySQL server
EclipseLink
HSQLDB embedded
OpenJPA
MySQL server
EclipseLink
HSQLDB embedded
OpenJPA
MySQL server
Basic Person Test32.30.9820.31.726.31.4
Element Collection Test14.30.00996.00.6510.20.33
Inheritance Test29.20.03323.91.526.60.75
Indexing Test55.30.6427.12.041.21.3
Graph (Binary Tree) Test6.80.4114.10.4310.40.42
Multithreading Test52.90.2728.42.940.61.6
All Tests31.80.3920.01.525.90.96

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

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

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 EclipseLink
HSQLDB embedded
OpenJPA
MySQL server
EclipseLink
HSQLDB embedded
OpenJPA
MySQL server
EclipseLink
HSQLDB embedded
OpenJPA
MySQL server
Basic Person Test20.93.616.36.018.64.8
Element Collection Test12.81.38.61.410.71.3
Inheritance Test19.51.017.32.518.41.8
Indexing Test28.01.924.96.626.54.3
Graph (Binary Tree) Test10.00.4511.90.4011.00.43
Multithreading Test27.02.014.65.520.83.8
All Tests20.11.815.73.917.92.8

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

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

Other Head to Head DBMS/JPA Comparisons