Compare with

Comparison of OpenJPA with PostgreSQL server vs EclipseLink with Derby 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
PostgreSQL server
EclipseLink
Derby server
OpenJPA
PostgreSQL server
EclipseLink
Derby server
OpenJPA
PostgreSQL server
EclipseLink
Derby server
Basic Person Test5.23.84.83.15.03.4
Element Collection Test2.82.22.21.52.51.8
Inheritance Test4.63.93.22.93.93.4
Indexing Test7.45.26.94.37.14.7
Graph (Binary Tree) Test0.981.90.811.70.891.8
Multithreading Test23.46.19.13.916.25.0
All Tests7.43.84.52.95.93.4

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
 OpenJPA
PostgreSQL server
EclipseLink
Derby server
OpenJPA
PostgreSQL server
EclipseLink
Derby server
OpenJPA
PostgreSQL server
EclipseLink
Derby server
Basic Person Test5.86.416.111.310.98.8
Element Collection Test0.0131.88.72.44.42.1
Inheritance Test5.23.717.612.911.48.3
Indexing Test4.83.618.712.811.88.2
Graph (Binary Tree) Test0.270.610.350.730.310.67
Multithreading Test11.98.523.319.817.614.1
All Tests4.74.114.110.09.47.0

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
 OpenJPA
PostgreSQL server
EclipseLink
Derby server
OpenJPA
PostgreSQL server
EclipseLink
Derby server
OpenJPA
PostgreSQL server
EclipseLink
Derby server
Basic Person Testfailed45.8failed5.3failed25.6
Element Collection Testfailed35.2failed0.99failed18.1
Inheritance Testfailed23.1failed5.9failed14.5
Indexing Testfailed2.5failed12.2failed7.4
Multithreading Testfailed34.3failed7.7failed21.0
All Testsfailed28.2failed6.4failed17.3

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
 OpenJPA
PostgreSQL server
EclipseLink
Derby server
OpenJPA
PostgreSQL server
EclipseLink
Derby server
OpenJPA
PostgreSQL server
EclipseLink
Derby server
Basic Person Test4.93.93.94.44.44.1
Element Collection Test0.0331.74.61.62.31.6
Inheritance Test4.84.64.96.14.95.3
Indexing Test5.14.56.07.65.66.1
Graph (Binary Tree) Test0.570.700.310.420.440.56
Multithreading Test22.27.37.44.814.86.0
All Tests6.33.84.54.25.44.0

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
 OpenJPA
PostgreSQL server
EclipseLink
Derby server
OpenJPA
PostgreSQL server
EclipseLink
Derby server
OpenJPA
PostgreSQL server
EclipseLink
Derby server
Basic Person Test4.62.85.33.95.03.3
Element Collection Test0.0321.22.80.551.40.87
Inheritance Test4.33.34.63.74.43.5
Indexing Test8.04.97.13.57.54.2
Graph (Binary Tree) Test0.530.510.550.500.540.51
Multithreading Test17.44.89.15.713.35.3
All Tests5.82.94.93.05.43.0

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
 OpenJPA
PostgreSQL server
EclipseLink
Derby server
OpenJPA
PostgreSQL server
EclipseLink
Derby server
OpenJPA
PostgreSQL server
EclipseLink
Derby server
Basic Person Test5.112.57.55.66.39.1
Element Collection Test0.728.44.61.42.64.9
Inheritance Test4.77.77.66.36.27.0
Indexing Test6.34.19.78.18.06.1
Graph (Binary Tree) Test0.590.930.500.830.550.88
Multithreading Test18.712.212.28.415.510.3
All Tests6.07.97.05.26.56.6

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