Compare with

Comparison of EclipseLink with HSQLDB embedded vs OpenJPA with PostgreSQL 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
PostgreSQL server
EclipseLink
HSQLDB embedded
OpenJPA
PostgreSQL server
EclipseLink
HSQLDB embedded
OpenJPA
PostgreSQL server
Basic Person Test27.15.217.24.822.25.0
Element Collection Test17.22.88.22.212.72.5
Inheritance Test26.74.611.93.219.33.9
Indexing Test30.67.418.66.924.67.1
Graph (Binary Tree) Test20.00.9815.90.8118.00.89
Multithreading Test32.523.411.49.122.016.2
All Tests25.77.413.94.519.85.9

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
 EclipseLink
HSQLDB embedded
OpenJPA
PostgreSQL server
EclipseLink
HSQLDB embedded
OpenJPA
PostgreSQL server
EclipseLink
HSQLDB embedded
OpenJPA
PostgreSQL server
Basic Person Test24.45.836.016.130.210.9
Element Collection Test14.90.01319.18.717.04.4
Inheritance Test22.85.240.017.631.411.4
Indexing Test20.74.838.718.729.711.8
Graph (Binary Tree) Test8.70.2714.20.3511.40.31
Multithreading Test24.211.928.023.326.117.6
All Tests19.34.729.314.124.39.4

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
 EclipseLink
HSQLDB embedded
OpenJPA
PostgreSQL server
EclipseLink
HSQLDB embedded
OpenJPA
PostgreSQL server
EclipseLink
HSQLDB embedded
OpenJPA
PostgreSQL server
Basic Person Test2.9failed0.88failed1.9failed
Element Collection Test3.2failed1.4failed2.3failed
Inheritance Test2.6failed1.1failed1.9failed
Indexing Test21.5failed33.3failed27.4failed
Multithreading Test1.1failed0.52failed0.82failed
All Tests6.3failed7.4failed6.9failed

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
 EclipseLink
HSQLDB embedded
OpenJPA
PostgreSQL server
EclipseLink
HSQLDB embedded
OpenJPA
PostgreSQL server
EclipseLink
HSQLDB embedded
OpenJPA
PostgreSQL server
Basic Person Test17.94.97.03.912.54.4
Element Collection Test14.60.0338.34.611.42.3
Inheritance Test16.24.89.74.913.04.9
Indexing Test12.05.16.86.09.45.6
Graph (Binary Tree) Test4.70.573.40.314.00.44
Multithreading Test24.422.24.47.414.414.8
All Tests15.06.36.64.510.85.4

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
 EclipseLink
HSQLDB embedded
OpenJPA
PostgreSQL server
EclipseLink
HSQLDB embedded
OpenJPA
PostgreSQL server
EclipseLink
HSQLDB embedded
OpenJPA
PostgreSQL server
Basic Person Test32.34.620.35.326.35.0
Element Collection Test14.30.0326.02.810.21.4
Inheritance Test29.24.323.94.626.64.4
Indexing Test55.38.027.17.141.27.5
Graph (Binary Tree) Test6.80.5314.10.5510.40.54
Multithreading Test52.917.428.49.140.613.3
All Tests31.85.820.04.925.95.4

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
 EclipseLink
HSQLDB embedded
OpenJPA
PostgreSQL server
EclipseLink
HSQLDB embedded
OpenJPA
PostgreSQL server
EclipseLink
HSQLDB embedded
OpenJPA
PostgreSQL server
Basic Person Test20.95.116.37.518.66.3
Element Collection Test12.80.728.64.610.72.6
Inheritance Test19.54.717.37.618.46.2
Indexing Test28.06.324.99.726.58.0
Graph (Binary Tree) Test10.00.5911.90.5011.00.55
Multithreading Test27.018.714.612.220.815.5
All Tests20.16.015.77.017.96.5

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