Compare with

Comparison of OpenJPA with HSQLDB embedded vs EclipseLink 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
 OpenJPA
HSQLDB embedded
EclipseLink
PostgreSQL server
OpenJPA
HSQLDB embedded
EclipseLink
PostgreSQL server
OpenJPA
HSQLDB embedded
EclipseLink
PostgreSQL server
Basic Person Test13.37.36.94.210.15.8
Element Collection Test8.63.15.31.97.02.5
Inheritance Test12.26.95.85.09.05.9
Indexing Test16.710.09.16.812.98.4
Graph (Binary Tree) Test6.13.57.33.36.73.4
Multithreading Test26.831.87.014.516.923.1
All Tests13.910.46.96.010.48.2

The results above show that in general OpenJPA with HSQLDB embedded is slightly more efficient than EclipseLink with PostgreSQL server in persisting JPA entity objects to the database.

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

On the other hand, OpenJPA with HSQLDB embedded is slower, for instance, when using multithreading with large transaction size. Comparing the normalized speed of OpenJPA with HSQLDB embedded database (7.0) to the normalized speed of EclipseLink with PostgreSQL database server (14.5) reveals that in that case, OpenJPA with HSQLDB embedded is 2.1 times slower than EclipseLink with PostgreSQL server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
HSQLDB embedded
EclipseLink
PostgreSQL server
OpenJPA
HSQLDB embedded
EclipseLink
PostgreSQL server
OpenJPA
HSQLDB embedded
EclipseLink
PostgreSQL server
Basic Person Test21.86.830.117.225.912.0
Element Collection Test0.00680.0264.50.0202.20.023
Inheritance Test0.00256.02.019.70.9812.9
Indexing Test22.15.643.619.532.912.6
Graph (Binary Tree) Test2.10.472.10.612.10.54
Multithreading Test20.913.523.527.822.220.6
All Tests11.15.417.614.114.49.8

The results above show that in general OpenJPA with HSQLDB embedded is more efficient than EclipseLink with PostgreSQL server in retrieving JPA entity objects from the database.

A huge performance gap has been detected when using JPA element collections with large retrieval size. Comparing the normalized speed of EclipseLink with PostgreSQL database server (0.020) to the normalized speed of OpenJPA with HSQLDB embedded database (4.5) reveals that in that case, OpenJPA with HSQLDB embedded is 225 times faster than EclipseLink with PostgreSQL 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 PostgreSQL database server (6.0) reveals that in that case, OpenJPA with HSQLDB embedded is 2,400 times slower than EclipseLink with PostgreSQL server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
HSQLDB embedded
EclipseLink
PostgreSQL server
OpenJPA
HSQLDB embedded
EclipseLink
PostgreSQL server
OpenJPA
HSQLDB embedded
EclipseLink
PostgreSQL server
Basic Person Test2.855.50.917.81.931.6
Element Collection Test1.415.40.950.0281.27.7
Inheritance Test2.454.91.311.51.833.2
Indexing Test15.40.07734.310.024.95.1
Multithreading Test1.455.30.5312.00.9533.7
All Tests4.736.27.68.36.122.3

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

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

On the other hand, EclipseLink with PostgreSQL server is slower, for instance, when using database indexes with small retrieval size. Comparing the normalized speed of EclipseLink with PostgreSQL database server (0.077) to the normalized speed of OpenJPA with HSQLDB embedded database (15.4) reveals that in that case, EclipseLink with PostgreSQL server is 200 times slower than OpenJPA with HSQLDB embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
HSQLDB embedded
EclipseLink
PostgreSQL server
OpenJPA
HSQLDB embedded
EclipseLink
PostgreSQL server
OpenJPA
HSQLDB embedded
EclipseLink
PostgreSQL server
Basic Person Test12.06.25.34.18.65.1
Element Collection Test0.0170.0803.70.0281.80.054
Inheritance Test0.00986.42.06.10.996.2
Indexing Test9.36.55.57.07.46.8
Graph (Binary Tree) Test2.50.901.60.502.10.70
Multithreading Test20.036.03.79.111.822.5
All Tests7.39.33.64.55.56.9

The results above show that in general EclipseLink with PostgreSQL server is slightly more efficient than OpenJPA with HSQLDB embedded in updating JPA entity objects in the database.

A huge performance gap has been detected 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 PostgreSQL database server (6.4) reveals that in that case, EclipseLink with PostgreSQL server is 653 times faster than OpenJPA with HSQLDB embedded.

On the other hand, EclipseLink with PostgreSQL server is slower, for instance, when using JPA element collections with large transaction size. Comparing the normalized speed of EclipseLink with PostgreSQL database server (0.028) to the normalized speed of OpenJPA with HSQLDB embedded database (3.7) reveals that in that case, EclipseLink with PostgreSQL server is 132 times slower than OpenJPA with HSQLDB embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
HSQLDB embedded
EclipseLink
PostgreSQL server
OpenJPA
HSQLDB embedded
EclipseLink
PostgreSQL server
OpenJPA
HSQLDB embedded
EclipseLink
PostgreSQL server
Basic Person Test21.35.715.75.718.55.7
Element Collection Test0.0110.0252.9stopped1.50.012
Inheritance Test0.00705.53.55.41.85.4
Indexing Test28.810.415.210.022.010.2
Graph (Binary Tree) Test2.90.0163.60.0133.20.015
Multithreading Test26.026.319.616.822.821.6
All Tests13.28.010.16.311.67.2

The results above show that in general OpenJPA with HSQLDB embedded is more efficient than EclipseLink with PostgreSQL server in deleting JPA entity objects from the database.

A huge performance gap has been detected when using graphs of objects with large transaction size. Comparing the normalized speed of EclipseLink with PostgreSQL database server (0.013) to the normalized speed of OpenJPA with HSQLDB embedded database (3.6) reveals that in that case, OpenJPA with HSQLDB embedded is 277 times faster than EclipseLink with PostgreSQL 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 PostgreSQL database server (5.5) reveals that in that case, OpenJPA with HSQLDB embedded is 786 times slower than EclipseLink with PostgreSQL server.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 OpenJPA
HSQLDB embedded
EclipseLink
PostgreSQL server
OpenJPA
HSQLDB embedded
EclipseLink
PostgreSQL server
OpenJPA
HSQLDB embedded
EclipseLink
PostgreSQL server
Basic Person Test14.316.311.87.813.012.1
Element Collection Test2.03.73.50.402.72.1
Inheritance Test2.915.92.99.52.912.7
Indexing Test18.56.521.610.720.08.6
Graph (Binary Tree) Test3.41.23.71.13.51.2
Multithreading Test19.032.610.916.014.924.3
All Tests10.213.19.27.89.710.5

The results above show that in general EclipseLink with PostgreSQL server is slightly more efficient than OpenJPA with HSQLDB embedded in performing JPA database operations.

A large performance gap has been detected when using class inheritance in the object model with small transaction/retrieval size. Comparing the normalized speed of OpenJPA with HSQLDB embedded database (2.9) to the normalized speed of EclipseLink with PostgreSQL database server (15.9) reveals that in that case, EclipseLink with PostgreSQL server is 5.5 times faster than OpenJPA with HSQLDB embedded.

On the other hand, EclipseLink with PostgreSQL server is slower, for instance, when using JPA element collections with large transaction/retrieval size. Comparing the normalized speed of EclipseLink with PostgreSQL database server (0.40) to the normalized speed of OpenJPA with HSQLDB embedded database (3.5) reveals that in that case, EclipseLink with PostgreSQL server is 8.8 times slower than OpenJPA with HSQLDB embedded.

Other Head to Head DBMS/JPA Comparisons