Compare with

Comparison of OpenJPA with Derby 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
Derby embedded
EclipseLink
PostgreSQL server
OpenJPA
Derby embedded
EclipseLink
PostgreSQL server
OpenJPA
Derby embedded
EclipseLink
PostgreSQL server
Basic Person Test4.87.32.94.23.95.8
Element Collection Test2.83.11.91.92.42.5
Inheritance Test4.16.92.45.03.35.9
Indexing Test6.110.04.16.85.18.4
Graph (Binary Tree) Test1.53.51.43.31.43.4
Multithreading Test8.731.83.314.56.023.1
All Tests4.710.42.76.03.78.2

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
 OpenJPA
Derby embedded
EclipseLink
PostgreSQL server
OpenJPA
Derby embedded
EclipseLink
PostgreSQL server
OpenJPA
Derby embedded
EclipseLink
PostgreSQL server
Basic Person Test14.86.822.617.218.712.0
Element Collection Test0.00310.0262.30.0201.20.023
Inheritance Test0.0156.07.019.73.512.9
Indexing Test11.75.626.519.519.112.6
Graph (Binary Tree) Test0.930.471.20.611.10.54
Multithreading Test25.213.528.627.826.920.6
All Tests8.85.414.714.111.79.8

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
 OpenJPA
Derby embedded
EclipseLink
PostgreSQL server
OpenJPA
Derby embedded
EclipseLink
PostgreSQL server
OpenJPA
Derby embedded
EclipseLink
PostgreSQL server
Basic Person Test49.755.59.97.829.831.6
Element Collection Test2.715.49.60.0286.17.7
Inheritance Test2.354.91.311.51.833.2
Indexing Test7.00.07717.110.012.15.1
Multithreading Test40.955.311.712.026.333.7
All Tests20.536.29.98.315.222.3

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
 OpenJPA
Derby embedded
EclipseLink
PostgreSQL server
OpenJPA
Derby embedded
EclipseLink
PostgreSQL server
OpenJPA
Derby embedded
EclipseLink
PostgreSQL server
Basic Person Test5.66.25.24.15.45.1
Element Collection Test0.00900.0802.20.0281.10.054
Inheritance Test0.0456.44.66.12.36.2
Indexing Test6.16.58.77.07.46.8
Graph (Binary Tree) Test1.60.900.910.501.30.70
Multithreading Test18.336.04.59.111.422.5
All Tests5.39.34.44.54.86.9

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
 OpenJPA
Derby embedded
EclipseLink
PostgreSQL server
OpenJPA
Derby embedded
EclipseLink
PostgreSQL server
OpenJPA
Derby embedded
EclipseLink
PostgreSQL server
Basic Person Test4.25.74.55.74.35.7
Element Collection Test0.00710.0251.6stopped0.800.012
Inheritance Test0.0355.53.05.41.55.4
Indexing Test5.310.43.610.04.410.2
Graph (Binary Tree) Test0.800.0160.930.0130.860.015
Multithreading Test5.726.36.216.86.021.6
All Tests2.78.03.36.33.07.2

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
 OpenJPA
Derby embedded
EclipseLink
PostgreSQL server
OpenJPA
Derby embedded
EclipseLink
PostgreSQL server
OpenJPA
Derby embedded
EclipseLink
PostgreSQL server
Basic Person Test15.816.39.07.812.412.1
Element Collection Test1.13.73.50.402.32.1
Inheritance Test1.315.93.79.52.512.7
Indexing Test7.26.512.010.79.68.6
Graph (Binary Tree) Test1.21.21.11.11.21.2
Multithreading Test19.832.610.916.015.324.3
All Tests8.013.16.97.87.410.5

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