Compare with

Comparison of EclipseLink with MySQL 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
MySQL server
OpenJPA
PostgreSQL server
EclipseLink
MySQL server
OpenJPA
PostgreSQL server
EclipseLink
MySQL server
OpenJPA
PostgreSQL server
Basic Person Test3.65.21.54.82.65.0
Element Collection Test1.52.80.692.21.12.5
Inheritance Test3.54.61.43.22.43.9
Indexing Test5.37.42.56.93.97.1
Graph (Binary Tree) Test1.70.981.30.811.50.89
Multithreading Test7.223.42.49.14.816.2
All Tests3.87.41.64.52.75.9

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

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
MySQL server
OpenJPA
PostgreSQL server
EclipseLink
MySQL server
OpenJPA
PostgreSQL server
EclipseLink
MySQL server
OpenJPA
PostgreSQL server
Basic Person Test0.435.815.516.18.010.9
Element Collection Test0.160.0131.48.70.784.4
Inheritance Test0.395.217.617.69.011.4
Indexing Test0.434.816.618.78.511.8
Graph (Binary Tree) Test0.530.270.760.350.650.31
Multithreading Test0.1911.911.023.35.617.6
All Tests0.354.710.514.15.49.4

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

A huge performance gap has been detected when using multithreading with small retrieval size. Comparing the normalized speed of EclipseLink with MySQL database server (0.19) to the normalized speed of OpenJPA with PostgreSQL database server (11.9) reveals that in that case, OpenJPA with PostgreSQL server is 62.6 times faster than EclipseLink with MySQL 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 MySQL database server (0.16) reveals that in that case, OpenJPA with PostgreSQL server is 12.3 times slower than EclipseLink with MySQL server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
MySQL server
OpenJPA
PostgreSQL server
EclipseLink
MySQL server
OpenJPA
PostgreSQL server
EclipseLink
MySQL server
OpenJPA
PostgreSQL server
Basic Person Test1.5failed0.44failed0.95failed
Element Collection Test1.4failed0.43failed0.92failed
Inheritance Test1.1failed0.61failed0.86failed
Indexing Test0.26failed0.52failed0.39failed
Multithreading Test1.9failed0.72failed1.3failed
All Tests1.2failed0.54failed0.88failed

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
MySQL server
OpenJPA
PostgreSQL server
EclipseLink
MySQL server
OpenJPA
PostgreSQL server
EclipseLink
MySQL server
OpenJPA
PostgreSQL server
Basic Person Test0.394.91.83.91.14.4
Element Collection Test0.230.0331.44.60.832.3
Inheritance Test0.424.82.64.91.54.9
Indexing Test0.465.13.16.01.85.6
Graph (Binary Tree) Test0.670.570.410.310.540.44
Multithreading Test0.4822.22.67.41.514.8
All Tests0.446.32.04.51.25.4

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

A huge performance gap has been detected when using multithreading with small transaction size. Comparing the normalized speed of EclipseLink with MySQL database server (0.48) to the normalized speed of OpenJPA with PostgreSQL database server (22.2) reveals that in that case, OpenJPA with PostgreSQL server is 46.2 times faster than EclipseLink with MySQL 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 MySQL database server (0.23) reveals that in that case, OpenJPA with PostgreSQL server is 7.0 times slower than EclipseLink with MySQL server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
MySQL server
OpenJPA
PostgreSQL server
EclipseLink
MySQL server
OpenJPA
PostgreSQL server
EclipseLink
MySQL server
OpenJPA
PostgreSQL server
Basic Person Test0.354.61.75.31.05.0
Element Collection Test0.110.0320.512.80.311.4
Inheritance Test0.294.31.64.60.944.4
Indexing Test0.468.01.97.11.27.5
Graph (Binary Tree) Test0.540.530.490.550.510.54
Multithreading Test0.3117.43.69.11.913.3
All Tests0.345.81.64.90.985.4

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

A huge performance gap has been detected when using multithreading with small transaction size. Comparing the normalized speed of EclipseLink with MySQL database server (0.31) to the normalized speed of OpenJPA with PostgreSQL database server (17.4) reveals that in that case, OpenJPA with PostgreSQL server is 56.1 times faster than EclipseLink with MySQL 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 MySQL database server (0.11) reveals that in that case, OpenJPA with PostgreSQL server is 3.4 times slower than EclipseLink with MySQL server.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 EclipseLink
MySQL server
OpenJPA
PostgreSQL server
EclipseLink
MySQL server
OpenJPA
PostgreSQL server
EclipseLink
MySQL server
OpenJPA
PostgreSQL server
Basic Person Test1.35.14.27.52.76.3
Element Collection Test0.690.720.894.60.792.6
Inheritance Test1.14.74.87.62.96.2
Indexing Test1.46.34.99.73.28.0
Graph (Binary Tree) Test0.850.590.730.500.790.55
Multithreading Test2.018.74.012.23.015.5
All Tests1.26.03.37.02.36.5

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

A large performance gap has been detected when using multithreading with small transaction/retrieval size. Comparing the normalized speed of EclipseLink with MySQL database server (2.0) to the normalized speed of OpenJPA with PostgreSQL database server (18.7) reveals that in that case, OpenJPA with PostgreSQL server is 9.4 times faster than EclipseLink with MySQL server.

Other Head to Head DBMS/JPA Comparisons