Compare with

Comparison of OpenJPA with MySQL 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
MySQL server
EclipseLink
PostgreSQL server
OpenJPA
MySQL server
EclipseLink
PostgreSQL server
OpenJPA
MySQL server
EclipseLink
PostgreSQL server
Basic Person Test3.97.31.64.22.75.8
Element Collection Test1.63.10.681.91.12.5
Inheritance Test3.66.91.45.02.55.9
Indexing Test5.610.02.46.84.08.4
Graph (Binary Tree) Test0.683.50.573.30.633.4
Multithreading Test7.231.82.714.54.923.1
All Tests3.710.41.56.02.68.2

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

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
MySQL server
EclipseLink
PostgreSQL server
OpenJPA
MySQL server
EclipseLink
PostgreSQL server
OpenJPA
MySQL server
EclipseLink
PostgreSQL server
Basic Person Test3.26.822.717.212.912.0
Element Collection Test0.00380.0262.90.0201.40.023
Inheritance Test0.0176.06.919.73.412.9
Indexing Test2.45.623.419.512.912.6
Graph (Binary Tree) Test0.270.470.350.610.310.54
Multithreading Test0.1413.518.127.89.120.6
All Tests1.05.412.414.16.79.8

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

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 MySQL database server (0.017) to the normalized speed of EclipseLink with PostgreSQL database server (6.0) reveals that in that case, EclipseLink with PostgreSQL server is 353 times faster than OpenJPA with MySQL 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 MySQL database server (2.9) reveals that in that case, EclipseLink with PostgreSQL server is 145 times slower than OpenJPA with MySQL server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
MySQL server
EclipseLink
PostgreSQL server
OpenJPA
MySQL server
EclipseLink
PostgreSQL server
OpenJPA
MySQL server
EclipseLink
PostgreSQL server
Basic Person Test9.355.52.27.85.831.6
Element Collection Test4.815.41.10.0282.97.7
Inheritance Test1.554.90.9011.51.233.2
Indexing Test0.310.0772.110.01.25.1
Multithreading Test1.955.30.9912.01.433.7
All Tests3.636.21.58.32.522.3

The results above show that in general EclipseLink with PostgreSQL server is much more efficient than OpenJPA with MySQL server in executing the tested JPA queries. Comparing the normalized speed of OpenJPA with MySQL database server (2.5) to the normalized speed of EclipseLink with PostgreSQL database server (22.3) reveals that in these tests, EclipseLink with PostgreSQL server is 8.9 times faster than OpenJPA with MySQL 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 MySQL database server (1.5) to the normalized speed of EclipseLink with PostgreSQL database server (54.9) reveals that in that case, EclipseLink with PostgreSQL server is 36.6 times faster than OpenJPA with MySQL 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 MySQL database server (1.1) reveals that in that case, EclipseLink with PostgreSQL server is 39.3 times slower than OpenJPA with MySQL server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
MySQL server
EclipseLink
PostgreSQL server
OpenJPA
MySQL server
EclipseLink
PostgreSQL server
OpenJPA
MySQL server
EclipseLink
PostgreSQL server
Basic Person Test0.746.21.64.11.25.1
Element Collection Test0.0140.0801.70.0280.870.054
Inheritance Test0.0486.42.06.11.06.2
Indexing Test0.746.53.07.01.96.8
Graph (Binary Tree) Test0.450.900.250.500.350.70
Multithreading Test0.5536.02.99.11.722.5
All Tests0.429.31.94.51.26.9

The results above show that in general EclipseLink with PostgreSQL server is much more efficient than OpenJPA with MySQL server in updating JPA entity objects in the database. Comparing the normalized speed of OpenJPA with MySQL database server (1.2) to the normalized speed of EclipseLink with PostgreSQL database server (6.9) reveals that in these tests, EclipseLink with PostgreSQL server is 5.8 times faster than OpenJPA with MySQL 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 MySQL database server (0.048) to the normalized speed of EclipseLink with PostgreSQL database server (6.4) reveals that in that case, EclipseLink with PostgreSQL server is 133 times faster than OpenJPA with MySQL 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 MySQL database server (1.7) reveals that in that case, EclipseLink with PostgreSQL server is 60.7 times slower than OpenJPA with MySQL server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
MySQL server
EclipseLink
PostgreSQL server
OpenJPA
MySQL server
EclipseLink
PostgreSQL server
OpenJPA
MySQL server
EclipseLink
PostgreSQL server
Basic Person Test0.985.71.75.71.45.7
Element Collection Test0.00990.0250.65stopped0.330.012
Inheritance Test0.0335.51.55.40.755.4
Indexing Test0.6410.42.010.01.310.2
Graph (Binary Tree) Test0.410.0160.430.0130.420.015
Multithreading Test0.2726.32.916.81.621.6
All Tests0.398.01.56.30.967.2

The results above show that in general EclipseLink with PostgreSQL server is much more efficient than OpenJPA with MySQL server in deleting JPA entity objects from the database. Comparing the normalized speed of OpenJPA with MySQL database server (0.96) to the normalized speed of EclipseLink with PostgreSQL database server (7.2) reveals that in these tests, EclipseLink with PostgreSQL server is 7.5 times faster than OpenJPA with MySQL 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 MySQL database server (0.033) to the normalized speed of EclipseLink with PostgreSQL database server (5.5) reveals that in that case, EclipseLink with PostgreSQL server is 167 times faster than OpenJPA with MySQL 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 MySQL database server (0.43) reveals that in that case, EclipseLink with PostgreSQL server is 33.1 times slower than OpenJPA with MySQL server.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 OpenJPA
MySQL server
EclipseLink
PostgreSQL server
OpenJPA
MySQL server
EclipseLink
PostgreSQL server
OpenJPA
MySQL server
EclipseLink
PostgreSQL server
Basic Person Test3.616.36.07.84.812.1
Element Collection Test1.33.71.40.401.32.1
Inheritance Test1.015.92.59.51.812.7
Indexing Test1.96.56.610.74.38.6
Graph (Binary Tree) Test0.451.20.401.10.431.2
Multithreading Test2.032.65.516.03.824.3
All Tests1.813.13.97.82.810.5

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

A huge performance gap has been detected when using multithreading with small transaction/retrieval size. Comparing the normalized speed of OpenJPA with MySQL database server (2.0) to the normalized speed of EclipseLink with PostgreSQL database server (32.6) reveals that in that case, EclipseLink with PostgreSQL server is 16.3 times faster than OpenJPA with MySQL 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 MySQL database server (1.4) reveals that in that case, EclipseLink with PostgreSQL server is 3.5 times slower than OpenJPA with MySQL server.

Other Head to Head DBMS/JPA Comparisons