Compare with

Comparison of OpenJPA with Derby server 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 server
EclipseLink
PostgreSQL server
OpenJPA
Derby server
EclipseLink
PostgreSQL server
OpenJPA
Derby server
EclipseLink
PostgreSQL server
Basic Person Test3.17.32.74.22.95.8
Element Collection Test2.03.11.71.91.82.5
Inheritance Test3.06.92.35.02.65.9
Indexing Test4.710.04.16.84.48.4
Graph (Binary Tree) Test0.713.50.643.30.673.4
Multithreading Test6.031.83.814.54.923.1
All Tests3.310.42.56.02.98.2

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

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
Derby server
EclipseLink
PostgreSQL server
OpenJPA
Derby server
EclipseLink
PostgreSQL server
OpenJPA
Derby server
EclipseLink
PostgreSQL server
Basic Person Test0.786.811.617.26.212.0
Element Collection Test0.00240.0261.10.0200.540.023
Inheritance Test0.0146.05.019.72.512.9
Indexing Test0.625.613.019.56.812.6
Graph (Binary Tree) Test0.0650.470.390.610.230.54
Multithreading Test1.613.519.027.810.320.6
All Tests0.515.48.414.14.49.8

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

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

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.020) to the normalized speed of OpenJPA with Derby database server (1.1) reveals that in that case, EclipseLink with PostgreSQL server is 55.0 times slower than OpenJPA with Derby server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
Derby server
EclipseLink
PostgreSQL server
OpenJPA
Derby server
EclipseLink
PostgreSQL server
OpenJPA
Derby server
EclipseLink
PostgreSQL server
Basic Person Test29.255.55.57.817.331.6
Element Collection Test2.215.41.40.0281.87.7
Inheritance Test2.254.91.011.51.633.2
Indexing Test2.20.07711.710.07.05.1
Multithreading Test35.555.38.312.021.933.7
All Tests14.336.25.68.39.922.3

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

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

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 database server (1.4) reveals that in that case, EclipseLink with PostgreSQL server is 50.0 times slower than OpenJPA with Derby server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
Derby server
EclipseLink
PostgreSQL server
OpenJPA
Derby server
EclipseLink
PostgreSQL server
OpenJPA
Derby server
EclipseLink
PostgreSQL server
Basic Person Test1.56.24.04.12.85.1
Element Collection Test0.00810.0801.90.0280.940.054
Inheritance Test0.0436.43.86.11.96.2
Indexing Test1.86.56.87.04.36.8
Graph (Binary Tree) Test0.160.900.270.500.220.70
Multithreading Test6.936.05.09.15.922.5
All Tests1.79.33.64.52.76.9

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

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

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 database server (1.9) reveals that in that case, EclipseLink with PostgreSQL server is 67.9 times slower than OpenJPA with Derby server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
Derby server
EclipseLink
PostgreSQL server
OpenJPA
Derby server
EclipseLink
PostgreSQL server
OpenJPA
Derby server
EclipseLink
PostgreSQL server
Basic Person Test1.45.73.75.72.55.7
Element Collection Test0.00820.0251.4stopped0.710.012
Inheritance Test0.0355.52.55.41.35.4
Indexing Test2.310.43.510.02.910.2
Graph (Binary Tree) Test0.130.0160.350.0130.240.015
Multithreading Test3.626.34.016.83.821.6
All Tests1.38.02.66.31.97.2

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

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 database server (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 server.

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 database server (0.35) reveals that in that case, EclipseLink with PostgreSQL server is 26.9 times slower than OpenJPA with Derby server.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 OpenJPA
Derby server
EclipseLink
PostgreSQL server
OpenJPA
Derby server
EclipseLink
PostgreSQL server
OpenJPA
Derby server
EclipseLink
PostgreSQL server
Basic Person Test7.216.35.57.86.412.1
Element Collection Test0.843.71.50.401.22.1
Inheritance Test1.115.92.99.52.012.7
Indexing Test2.36.57.810.75.18.6
Graph (Binary Tree) Test0.271.20.411.10.341.2
Multithreading Test10.732.68.016.09.424.3
All Tests3.913.14.57.84.210.5

The results above show that in general EclipseLink with PostgreSQL server is more efficient than OpenJPA with Derby server in performing JPA database operations. Comparing the normalized speed of OpenJPA with Derby database server (4.2) to the normalized speed of EclipseLink with PostgreSQL database server (10.5) reveals that in these tests, EclipseLink with PostgreSQL server is 2.5 times faster than OpenJPA with Derby server.

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

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 database server (1.5) reveals that in that case, EclipseLink with PostgreSQL server is 3.8 times slower than OpenJPA with Derby server.

Other Head to Head DBMS/JPA Comparisons