Compare with

Comparison of OpenJPA with PostgreSQL server 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
PostgreSQL server
EclipseLink
HSQLDB embedded
OpenJPA
PostgreSQL server
EclipseLink
HSQLDB embedded
OpenJPA
PostgreSQL server
EclipseLink
HSQLDB embedded
Basic Person Test5.227.14.817.25.022.2
Element Collection Test2.817.22.28.22.512.7
Inheritance Test4.626.73.211.93.919.3
Indexing Test7.430.66.918.67.124.6
Graph (Binary Tree) Test0.9820.00.8115.90.8918.0
Multithreading Test23.432.59.111.416.222.0
All Tests7.425.74.513.95.919.8

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

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
PostgreSQL server
EclipseLink
HSQLDB embedded
OpenJPA
PostgreSQL server
EclipseLink
HSQLDB embedded
OpenJPA
PostgreSQL server
EclipseLink
HSQLDB embedded
Basic Person Test5.824.416.136.010.930.2
Element Collection Test0.01314.98.719.14.417.0
Inheritance Test5.222.817.640.011.431.4
Indexing Test4.820.718.738.711.829.7
Graph (Binary Tree) Test0.278.70.3514.20.3111.4
Multithreading Test11.924.223.328.017.626.1
All Tests4.719.314.129.39.424.3

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

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
PostgreSQL server
EclipseLink
HSQLDB embedded
OpenJPA
PostgreSQL server
EclipseLink
HSQLDB embedded
OpenJPA
PostgreSQL server
EclipseLink
HSQLDB embedded
Basic Person Testfailed2.9failed0.88failed1.9
Element Collection Testfailed3.2failed1.4failed2.3
Inheritance Testfailed2.6failed1.1failed1.9
Indexing Testfailed21.5failed33.3failed27.4
Multithreading Testfailed1.1failed0.52failed0.82
All Testsfailed6.3failed7.4failed6.9

OpenJPA with PostgreSQL server has failed in 10 tests (see exceptions).

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
PostgreSQL server
EclipseLink
HSQLDB embedded
OpenJPA
PostgreSQL server
EclipseLink
HSQLDB embedded
OpenJPA
PostgreSQL server
EclipseLink
HSQLDB embedded
Basic Person Test4.917.93.97.04.412.5
Element Collection Test0.03314.64.68.32.311.4
Inheritance Test4.816.24.99.74.913.0
Indexing Test5.112.06.06.85.69.4
Graph (Binary Tree) Test0.574.70.313.40.444.0
Multithreading Test22.224.47.44.414.814.4
All Tests6.315.04.56.65.410.8

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

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
PostgreSQL server
EclipseLink
HSQLDB embedded
OpenJPA
PostgreSQL server
EclipseLink
HSQLDB embedded
OpenJPA
PostgreSQL server
EclipseLink
HSQLDB embedded
Basic Person Test4.632.35.320.35.026.3
Element Collection Test0.03214.32.86.01.410.2
Inheritance Test4.329.24.623.94.426.6
Indexing Test8.055.37.127.17.541.2
Graph (Binary Tree) Test0.536.80.5514.10.5410.4
Multithreading Test17.452.99.128.413.340.6
All Tests5.831.84.920.05.425.9

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

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

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 OpenJPA
PostgreSQL server
EclipseLink
HSQLDB embedded
OpenJPA
PostgreSQL server
EclipseLink
HSQLDB embedded
OpenJPA
PostgreSQL server
EclipseLink
HSQLDB embedded
Basic Person Test5.120.97.516.36.318.6
Element Collection Test0.7212.84.68.62.610.7
Inheritance Test4.719.57.617.36.218.4
Indexing Test6.328.09.724.98.026.5
Graph (Binary Tree) Test0.5910.00.5011.90.5511.0
Multithreading Test18.727.012.214.615.520.8
All Tests6.020.17.015.76.517.9

The results above show that in general EclipseLink with HSQLDB embedded is more efficient than OpenJPA with PostgreSQL server in performing JPA database operations. Comparing the normalized speed of OpenJPA with PostgreSQL database server (6.5) to the normalized speed of EclipseLink with HSQLDB embedded database (17.9) reveals that in these tests, EclipseLink with HSQLDB embedded is 2.8 times faster than OpenJPA with PostgreSQL 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 PostgreSQL database server (0.50) to the normalized speed of EclipseLink with HSQLDB embedded database (11.9) reveals that in that case, EclipseLink with HSQLDB embedded is 23.8 times faster than OpenJPA with PostgreSQL server.

Other Head to Head DBMS/JPA Comparisons