Compare with

Comparison of EclipseLink with PostgreSQL server vs OpenJPA with Derby 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
Derby embedded
EclipseLink
PostgreSQL server
OpenJPA
Derby embedded
EclipseLink
PostgreSQL server
OpenJPA
Derby embedded
Basic Person Test7.34.84.22.95.83.9
Element Collection Test3.12.81.91.92.52.4
Inheritance Test6.94.15.02.45.93.3
Indexing Test10.06.16.84.18.45.1
Graph (Binary Tree) Test3.51.53.31.43.41.4
Multithreading Test31.88.714.53.323.16.0
All Tests10.44.76.02.78.23.7

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

A large performance gap has been detected when using multithreading with large transaction size. Comparing the normalized speed of OpenJPA with Derby embedded database (3.3) to the normalized speed of EclipseLink with PostgreSQL database server (14.5) reveals that in that case, EclipseLink with PostgreSQL server is 4.4 times faster than OpenJPA with Derby embedded.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
PostgreSQL server
OpenJPA
Derby embedded
EclipseLink
PostgreSQL server
OpenJPA
Derby embedded
EclipseLink
PostgreSQL server
OpenJPA
Derby embedded
Basic Person Test6.814.817.222.612.018.7
Element Collection Test0.0260.00310.0202.30.0231.2
Inheritance Test6.00.01519.77.012.93.5
Indexing Test5.611.719.526.512.619.1
Graph (Binary Tree) Test0.470.930.611.20.541.1
Multithreading Test13.525.227.828.620.626.9
All Tests5.48.814.114.79.811.7

The results above show that in general OpenJPA with Derby embedded is slightly 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 Derby embedded database (2.3) reveals that in that case, OpenJPA with Derby embedded is 115 times faster than EclipseLink with PostgreSQL server.

On the other hand, OpenJPA with Derby embedded is slower, for instance, when using class inheritance in the object model with small retrieval size. Comparing the normalized speed of OpenJPA with Derby embedded database (0.015) to the normalized speed of EclipseLink with PostgreSQL database server (6.0) reveals that in that case, OpenJPA with Derby embedded is 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
Derby embedded
EclipseLink
PostgreSQL server
OpenJPA
Derby embedded
EclipseLink
PostgreSQL server
OpenJPA
Derby embedded
Basic Person Test55.549.77.89.931.629.8
Element Collection Test15.42.70.0289.67.76.1
Inheritance Test54.92.311.51.333.21.8
Indexing Test0.0777.010.017.15.112.1
Multithreading Test55.340.912.011.733.726.3
All Tests36.220.58.39.922.315.2

The results above show that in general EclipseLink with PostgreSQL server is more efficient than OpenJPA with Derby embedded in executing the tested JPA queries.

A huge performance gap has been detected when using class inheritance in the object model with small retrieval size. Comparing the normalized speed of OpenJPA with Derby embedded database (2.3) to the normalized speed of EclipseLink with PostgreSQL database server (54.9) reveals that in that case, EclipseLink with PostgreSQL server is 23.9 times faster than OpenJPA with Derby embedded.

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
PostgreSQL server
OpenJPA
Derby embedded
EclipseLink
PostgreSQL server
OpenJPA
Derby embedded
EclipseLink
PostgreSQL server
OpenJPA
Derby embedded
Basic Person Test6.25.64.15.25.15.4
Element Collection Test0.0800.00900.0282.20.0541.1
Inheritance Test6.40.0456.14.66.22.3
Indexing Test6.56.17.08.76.87.4
Graph (Binary Tree) Test0.901.60.500.910.701.3
Multithreading Test36.018.39.14.522.511.4
All Tests9.35.34.54.46.94.8

The results above show that in general EclipseLink with PostgreSQL server is more efficient than OpenJPA with Derby 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 Derby embedded database (0.045) to the normalized speed of EclipseLink with PostgreSQL database server (6.4) reveals that in that case, EclipseLink with PostgreSQL server is 142 times faster than OpenJPA with Derby 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 Derby embedded database (2.2) reveals that in that case, EclipseLink with PostgreSQL server is 78.6 times slower than OpenJPA with Derby embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
PostgreSQL server
OpenJPA
Derby embedded
EclipseLink
PostgreSQL server
OpenJPA
Derby embedded
EclipseLink
PostgreSQL server
OpenJPA
Derby embedded
Basic Person Test5.74.25.74.55.74.3
Element Collection Test0.0250.0071stopped1.60.0120.80
Inheritance Test5.50.0355.43.05.41.5
Indexing Test10.45.310.03.610.24.4
Graph (Binary Tree) Test0.0160.800.0130.930.0150.86
Multithreading Test26.35.716.86.221.66.0
All Tests8.02.76.33.37.23.0

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

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 Derby embedded database (0.035) to the normalized speed of EclipseLink with PostgreSQL database server (5.5) reveals that in that case, EclipseLink with PostgreSQL server is 157 times faster than OpenJPA with Derby embedded.

On the other hand, EclipseLink with PostgreSQL server is slower, for instance, 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 Derby embedded database (0.93) reveals that in that case, EclipseLink with PostgreSQL server is 71.5 times slower than OpenJPA with Derby embedded.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 EclipseLink
PostgreSQL server
OpenJPA
Derby embedded
EclipseLink
PostgreSQL server
OpenJPA
Derby embedded
EclipseLink
PostgreSQL server
OpenJPA
Derby embedded
Basic Person Test16.315.87.89.012.112.4
Element Collection Test3.71.10.403.52.12.3
Inheritance Test15.91.39.53.712.72.5
Indexing Test6.57.210.712.08.69.6
Graph (Binary Tree) Test1.21.21.11.11.21.2
Multithreading Test32.619.816.010.924.315.3
All Tests13.18.07.86.910.57.4

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

A huge 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 Derby embedded database (1.3) to the normalized speed of EclipseLink with PostgreSQL database server (15.9) reveals that in that case, EclipseLink with PostgreSQL server is 12.2 times faster than OpenJPA with Derby 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 Derby embedded database (3.5) reveals that in that case, EclipseLink with PostgreSQL server is 8.8 times slower than OpenJPA with Derby embedded.

Other Head to Head DBMS/JPA Comparisons