Compare with

Comparison of OpenJPA with HSQLDB embedded vs EclipseLink 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
 OpenJPA
HSQLDB embedded
EclipseLink
MySQL server
OpenJPA
HSQLDB embedded
EclipseLink
MySQL server
OpenJPA
HSQLDB embedded
EclipseLink
MySQL server
Basic Person Test13.33.66.91.510.12.6
Element Collection Test8.61.55.30.697.01.1
Inheritance Test12.23.55.81.49.02.4
Indexing Test16.75.39.12.512.93.9
Graph (Binary Tree) Test6.11.77.31.36.71.5
Multithreading Test26.87.27.02.416.94.8
All Tests13.93.86.91.610.42.7

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

A large performance gap has been detected when using JPA element collections with large transaction size. Comparing the normalized speed of EclipseLink with MySQL database server (0.69) to the normalized speed of OpenJPA with HSQLDB embedded database (5.3) reveals that in that case, OpenJPA with HSQLDB embedded is 7.7 times faster than EclipseLink with MySQL server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
HSQLDB embedded
EclipseLink
MySQL server
OpenJPA
HSQLDB embedded
EclipseLink
MySQL server
OpenJPA
HSQLDB embedded
EclipseLink
MySQL server
Basic Person Test21.80.4330.115.525.98.0
Element Collection Test0.00680.164.51.42.20.78
Inheritance Test0.00250.392.017.60.989.0
Indexing Test22.10.4343.616.632.98.5
Graph (Binary Tree) Test2.10.532.10.762.10.65
Multithreading Test20.90.1923.511.022.25.6
All Tests11.10.3517.610.514.45.4

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

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

On the other hand, OpenJPA with HSQLDB embedded is slower, for instance, 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 MySQL database server (0.39) reveals that in that case, OpenJPA with HSQLDB embedded is 156 times slower than EclipseLink with MySQL server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
HSQLDB embedded
EclipseLink
MySQL server
OpenJPA
HSQLDB embedded
EclipseLink
MySQL server
OpenJPA
HSQLDB embedded
EclipseLink
MySQL server
Basic Person Test2.81.50.910.441.90.95
Element Collection Test1.41.40.950.431.20.92
Inheritance Test2.41.11.30.611.80.86
Indexing Test15.40.2634.30.5224.90.39
Multithreading Test1.41.90.530.720.951.3
All Tests4.71.27.60.546.10.88

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

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
HSQLDB embedded
EclipseLink
MySQL server
OpenJPA
HSQLDB embedded
EclipseLink
MySQL server
OpenJPA
HSQLDB embedded
EclipseLink
MySQL server
Basic Person Test12.00.395.31.88.61.1
Element Collection Test0.0170.233.71.41.80.83
Inheritance Test0.00980.422.02.60.991.5
Indexing Test9.30.465.53.17.41.8
Graph (Binary Tree) Test2.50.671.60.412.10.54
Multithreading Test20.00.483.72.611.81.5
All Tests7.30.443.62.05.51.2

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

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

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.0098) to the normalized speed of EclipseLink with MySQL database server (0.42) reveals that in that case, OpenJPA with HSQLDB embedded is 42.9 times slower than EclipseLink with MySQL server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
HSQLDB embedded
EclipseLink
MySQL server
OpenJPA
HSQLDB embedded
EclipseLink
MySQL server
OpenJPA
HSQLDB embedded
EclipseLink
MySQL server
Basic Person Test21.30.3515.71.718.51.0
Element Collection Test0.0110.112.90.511.50.31
Inheritance Test0.00700.293.51.61.80.94
Indexing Test28.80.4615.21.922.01.2
Graph (Binary Tree) Test2.90.543.60.493.20.51
Multithreading Test26.00.3119.63.622.81.9
All Tests13.20.3410.11.611.60.98

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

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

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 MySQL database server (0.29) reveals that in that case, OpenJPA with HSQLDB embedded is 41.4 times slower than EclipseLink with MySQL server.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 OpenJPA
HSQLDB embedded
EclipseLink
MySQL server
OpenJPA
HSQLDB embedded
EclipseLink
MySQL server
OpenJPA
HSQLDB embedded
EclipseLink
MySQL server
Basic Person Test14.31.311.84.213.02.7
Element Collection Test2.00.693.50.892.70.79
Inheritance Test2.91.12.94.82.92.9
Indexing Test18.51.421.64.920.03.2
Graph (Binary Tree) Test3.40.853.70.733.50.79
Multithreading Test19.02.010.94.014.93.0
All Tests10.21.29.23.39.72.3

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

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

Other Head to Head DBMS/JPA Comparisons