Compare with

Comparison of EclipseLink with Derby server vs OpenJPA 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
 EclipseLink
Derby server
OpenJPA
PostgreSQL server
EclipseLink
Derby server
OpenJPA
PostgreSQL server
EclipseLink
Derby server
OpenJPA
PostgreSQL server
Basic Person Test3.85.23.14.83.45.0
Element Collection Test2.22.81.52.21.82.5
Inheritance Test3.94.62.93.23.43.9
Indexing Test5.27.44.36.94.77.1
Graph (Binary Tree) Test1.90.981.70.811.80.89
Multithreading Test6.123.43.99.15.016.2
All Tests3.87.42.94.53.45.9

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

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

On the other hand, OpenJPA with PostgreSQL server is slower, for instance, when using graphs of objects with large transaction size. Comparing the normalized speed of OpenJPA with PostgreSQL database server (0.81) to the normalized speed of EclipseLink with Derby database server (1.7) reveals that in that case, OpenJPA with PostgreSQL server is 2.1 times slower than EclipseLink with Derby server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
Derby server
OpenJPA
PostgreSQL server
EclipseLink
Derby server
OpenJPA
PostgreSQL server
EclipseLink
Derby server
OpenJPA
PostgreSQL server
Basic Person Test6.45.811.316.18.810.9
Element Collection Test1.80.0132.48.72.14.4
Inheritance Test3.75.212.917.68.311.4
Indexing Test3.64.812.818.78.211.8
Graph (Binary Tree) Test0.610.270.730.350.670.31
Multithreading Test8.511.919.823.314.117.6
All Tests4.14.710.014.17.09.4

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

A large performance gap has been detected when using JPA element collections with large retrieval size. Comparing the normalized speed of EclipseLink with Derby database server (2.4) to the normalized speed of OpenJPA with PostgreSQL database server (8.7) reveals that in that case, OpenJPA with PostgreSQL server is 3.6 times faster than EclipseLink with Derby server.

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
Derby server
OpenJPA
PostgreSQL server
EclipseLink
Derby server
OpenJPA
PostgreSQL server
EclipseLink
Derby server
OpenJPA
PostgreSQL server
Basic Person Test45.8failed5.3failed25.6failed
Element Collection Test35.2failed0.99failed18.1failed
Inheritance Test23.1failed5.9failed14.5failed
Indexing Test2.5failed12.2failed7.4failed
Multithreading Test34.3failed7.7failed21.0failed
All Tests28.2failed6.4failed17.3failed

OpenJPA with PostgreSQL server has failed in 10 tests (see exceptions).

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
Derby server
OpenJPA
PostgreSQL server
EclipseLink
Derby server
OpenJPA
PostgreSQL server
EclipseLink
Derby server
OpenJPA
PostgreSQL server
Basic Person Test3.94.94.43.94.14.4
Element Collection Test1.70.0331.64.61.62.3
Inheritance Test4.64.86.14.95.34.9
Indexing Test4.55.17.66.06.15.6
Graph (Binary Tree) Test0.700.570.420.310.560.44
Multithreading Test7.322.24.87.46.014.8
All Tests3.86.34.24.54.05.4

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

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

On the other hand, OpenJPA with PostgreSQL server is slower, for instance, when using JPA element collections with small transaction size. Comparing the normalized speed of OpenJPA with PostgreSQL database server (0.033) to the normalized speed of EclipseLink with Derby database server (1.7) reveals that in that case, OpenJPA with PostgreSQL server is 51.5 times slower than EclipseLink with Derby server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
Derby server
OpenJPA
PostgreSQL server
EclipseLink
Derby server
OpenJPA
PostgreSQL server
EclipseLink
Derby server
OpenJPA
PostgreSQL server
Basic Person Test2.84.63.95.33.35.0
Element Collection Test1.20.0320.552.80.871.4
Inheritance Test3.34.33.74.63.54.4
Indexing Test4.98.03.57.14.27.5
Graph (Binary Tree) Test0.510.530.500.550.510.54
Multithreading Test4.817.45.79.15.313.3
All Tests2.95.83.04.93.05.4

The results above show that in general OpenJPA with PostgreSQL server is more efficient than EclipseLink with Derby server in deleting JPA entity objects from 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 Derby database server (0.55) to the normalized speed of OpenJPA with PostgreSQL database server (2.8) reveals that in that case, OpenJPA with PostgreSQL server is 5.1 times faster than EclipseLink with Derby server.

On the other hand, OpenJPA with PostgreSQL server is slower, for instance, when using JPA element collections with small transaction size. Comparing the normalized speed of OpenJPA with PostgreSQL database server (0.032) to the normalized speed of EclipseLink with Derby database server (1.2) reveals that in that case, OpenJPA with PostgreSQL server is 37.5 times slower than EclipseLink with Derby server.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 EclipseLink
Derby server
OpenJPA
PostgreSQL server
EclipseLink
Derby server
OpenJPA
PostgreSQL server
EclipseLink
Derby server
OpenJPA
PostgreSQL server
Basic Person Test12.55.15.67.59.16.3
Element Collection Test8.40.721.44.64.92.6
Inheritance Test7.74.76.37.67.06.2
Indexing Test4.16.38.19.76.18.0
Graph (Binary Tree) Test0.930.590.830.500.880.55
Multithreading Test12.218.78.412.210.315.5
All Tests7.96.05.27.06.66.5

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

A huge performance gap has been detected when using JPA element collections with small transaction/retrieval size. Comparing the normalized speed of OpenJPA with PostgreSQL database server (0.72) to the normalized speed of EclipseLink with Derby database server (8.4) reveals that in that case, EclipseLink with Derby server is 11.7 times faster than OpenJPA with PostgreSQL server.

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

Other Head to Head DBMS/JPA Comparisons