Compare with

Comparison of EclipseLink with PostgreSQL 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
PostgreSQL server
OpenJPA
HSQLDB embedded
EclipseLink
PostgreSQL server
OpenJPA
HSQLDB embedded
EclipseLink
PostgreSQL server
OpenJPA
HSQLDB embedded
Basic Person Test7.313.34.26.95.810.1
Element Collection Test3.18.61.95.32.57.0
Inheritance Test6.912.25.05.85.99.0
Indexing Test10.016.76.89.18.412.9
Graph (Binary Tree) Test3.56.13.37.33.46.7
Multithreading Test31.826.814.57.023.116.9
All Tests10.413.96.06.98.210.4

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
 EclipseLink
PostgreSQL server
OpenJPA
HSQLDB embedded
EclipseLink
PostgreSQL server
OpenJPA
HSQLDB embedded
EclipseLink
PostgreSQL server
OpenJPA
HSQLDB embedded
Basic Person Test6.821.817.230.112.025.9
Element Collection Test0.0260.00680.0204.50.0232.2
Inheritance Test6.00.002519.72.012.90.98
Indexing Test5.622.119.543.612.632.9
Graph (Binary Tree) Test0.472.10.612.10.542.1
Multithreading Test13.520.927.823.520.622.2
All Tests5.411.114.117.69.814.4

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
 EclipseLink
PostgreSQL server
OpenJPA
HSQLDB embedded
EclipseLink
PostgreSQL server
OpenJPA
HSQLDB embedded
EclipseLink
PostgreSQL server
OpenJPA
HSQLDB embedded
Basic Person Test55.52.87.80.9131.61.9
Element Collection Test15.41.40.0280.957.71.2
Inheritance Test54.92.411.51.333.21.8
Indexing Test0.07715.410.034.35.124.9
Multithreading Test55.31.412.00.5333.70.95
All Tests36.24.78.37.622.36.1

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
 EclipseLink
PostgreSQL server
OpenJPA
HSQLDB embedded
EclipseLink
PostgreSQL server
OpenJPA
HSQLDB embedded
EclipseLink
PostgreSQL server
OpenJPA
HSQLDB embedded
Basic Person Test6.212.04.15.35.18.6
Element Collection Test0.0800.0170.0283.70.0541.8
Inheritance Test6.40.00986.12.06.20.99
Indexing Test6.59.37.05.56.87.4
Graph (Binary Tree) Test0.902.50.501.60.702.1
Multithreading Test36.020.09.13.722.511.8
All Tests9.37.34.53.66.95.5

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
 EclipseLink
PostgreSQL server
OpenJPA
HSQLDB embedded
EclipseLink
PostgreSQL server
OpenJPA
HSQLDB embedded
EclipseLink
PostgreSQL server
OpenJPA
HSQLDB embedded
Basic Person Test5.721.35.715.75.718.5
Element Collection Test0.0250.011stopped2.90.0121.5
Inheritance Test5.50.00705.43.55.41.8
Indexing Test10.428.810.015.210.222.0
Graph (Binary Tree) Test0.0162.90.0133.60.0153.2
Multithreading Test26.326.016.819.621.622.8
All Tests8.013.26.310.17.211.6

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
 EclipseLink
PostgreSQL server
OpenJPA
HSQLDB embedded
EclipseLink
PostgreSQL server
OpenJPA
HSQLDB embedded
EclipseLink
PostgreSQL server
OpenJPA
HSQLDB embedded
Basic Person Test16.314.37.811.812.113.0
Element Collection Test3.72.00.403.52.12.7
Inheritance Test15.92.99.52.912.72.9
Indexing Test6.518.510.721.68.620.0
Graph (Binary Tree) Test1.23.41.13.71.23.5
Multithreading Test32.619.016.010.924.314.9
All Tests13.110.27.89.210.59.7

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