Compare with

Comparison of EclipseLink with MySQL server 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
MySQL server
OpenJPA
HSQLDB embedded
EclipseLink
MySQL server
OpenJPA
HSQLDB embedded
EclipseLink
MySQL server
OpenJPA
HSQLDB embedded
Basic Person Test3.613.31.56.92.610.1
Element Collection Test1.58.60.695.31.17.0
Inheritance Test3.512.21.45.82.49.0
Indexing Test5.316.72.59.13.912.9
Graph (Binary Tree) Test1.76.11.37.31.56.7
Multithreading Test7.226.82.47.04.816.9
All Tests3.813.91.66.92.710.4

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
 EclipseLink
MySQL server
OpenJPA
HSQLDB embedded
EclipseLink
MySQL server
OpenJPA
HSQLDB embedded
EclipseLink
MySQL server
OpenJPA
HSQLDB embedded
Basic Person Test0.4321.815.530.18.025.9
Element Collection Test0.160.00681.44.50.782.2
Inheritance Test0.390.002517.62.09.00.98
Indexing Test0.4322.116.643.68.532.9
Graph (Binary Tree) Test0.532.10.762.10.652.1
Multithreading Test0.1920.911.023.55.622.2
All Tests0.3511.110.517.65.414.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
 EclipseLink
MySQL server
OpenJPA
HSQLDB embedded
EclipseLink
MySQL server
OpenJPA
HSQLDB embedded
EclipseLink
MySQL server
OpenJPA
HSQLDB embedded
Basic Person Test1.52.80.440.910.951.9
Element Collection Test1.41.40.430.950.921.2
Inheritance Test1.12.40.611.30.861.8
Indexing Test0.2615.40.5234.30.3924.9
Multithreading Test1.91.40.720.531.30.95
All Tests1.24.70.547.60.886.1

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
 EclipseLink
MySQL server
OpenJPA
HSQLDB embedded
EclipseLink
MySQL server
OpenJPA
HSQLDB embedded
EclipseLink
MySQL server
OpenJPA
HSQLDB embedded
Basic Person Test0.3912.01.85.31.18.6
Element Collection Test0.230.0171.43.70.831.8
Inheritance Test0.420.00982.62.01.50.99
Indexing Test0.469.33.15.51.87.4
Graph (Binary Tree) Test0.672.50.411.60.542.1
Multithreading Test0.4820.02.63.71.511.8
All Tests0.447.32.03.61.25.5

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
 EclipseLink
MySQL server
OpenJPA
HSQLDB embedded
EclipseLink
MySQL server
OpenJPA
HSQLDB embedded
EclipseLink
MySQL server
OpenJPA
HSQLDB embedded
Basic Person Test0.3521.31.715.71.018.5
Element Collection Test0.110.0110.512.90.311.5
Inheritance Test0.290.00701.63.50.941.8
Indexing Test0.4628.81.915.21.222.0
Graph (Binary Tree) Test0.542.90.493.60.513.2
Multithreading Test0.3126.03.619.61.922.8
All Tests0.3413.21.610.10.9811.6

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
 EclipseLink
MySQL server
OpenJPA
HSQLDB embedded
EclipseLink
MySQL server
OpenJPA
HSQLDB embedded
EclipseLink
MySQL server
OpenJPA
HSQLDB embedded
Basic Person Test1.314.34.211.82.713.0
Element Collection Test0.692.00.893.50.792.7
Inheritance Test1.12.94.82.92.92.9
Indexing Test1.418.54.921.63.220.0
Graph (Binary Tree) Test0.853.40.733.70.793.5
Multithreading Test2.019.04.010.93.014.9
All Tests1.210.23.39.22.39.7

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