Compare with

Comparison of EclipseLink with PostgreSQL server vs OpenJPA with MySQL 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
PostgreSQL server
OpenJPA
MySQL server
EclipseLink
PostgreSQL server
OpenJPA
MySQL server
EclipseLink
PostgreSQL server
OpenJPA
MySQL server
Basic Person Test7.33.94.21.65.82.7
Element Collection Test3.11.61.90.682.51.1
Inheritance Test6.93.65.01.45.92.5
Indexing Test10.05.66.82.48.44.0
Graph (Binary Tree) Test3.50.683.30.573.40.63
Multithreading Test31.87.214.52.723.14.9
All Tests10.43.76.01.58.22.6

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
 EclipseLink
PostgreSQL server
OpenJPA
MySQL server
EclipseLink
PostgreSQL server
OpenJPA
MySQL server
EclipseLink
PostgreSQL server
OpenJPA
MySQL server
Basic Person Test6.83.217.222.712.012.9
Element Collection Test0.0260.00380.0202.90.0231.4
Inheritance Test6.00.01719.76.912.93.4
Indexing Test5.62.419.523.412.612.9
Graph (Binary Tree) Test0.470.270.610.350.540.31
Multithreading Test13.50.1427.818.120.69.1
All Tests5.41.014.112.49.86.7

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
 EclipseLink
PostgreSQL server
OpenJPA
MySQL server
EclipseLink
PostgreSQL server
OpenJPA
MySQL server
EclipseLink
PostgreSQL server
OpenJPA
MySQL server
Basic Person Test55.59.37.82.231.65.8
Element Collection Test15.44.80.0281.17.72.9
Inheritance Test54.91.511.50.9033.21.2
Indexing Test0.0770.3110.02.15.11.2
Multithreading Test55.31.912.00.9933.71.4
All Tests36.23.68.31.522.32.5

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
 EclipseLink
PostgreSQL server
OpenJPA
MySQL server
EclipseLink
PostgreSQL server
OpenJPA
MySQL server
EclipseLink
PostgreSQL server
OpenJPA
MySQL server
Basic Person Test6.20.744.11.65.11.2
Element Collection Test0.0800.0140.0281.70.0540.87
Inheritance Test6.40.0486.12.06.21.0
Indexing Test6.50.747.03.06.81.9
Graph (Binary Tree) Test0.900.450.500.250.700.35
Multithreading Test36.00.559.12.922.51.7
All Tests9.30.424.51.96.91.2

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
 EclipseLink
PostgreSQL server
OpenJPA
MySQL server
EclipseLink
PostgreSQL server
OpenJPA
MySQL server
EclipseLink
PostgreSQL server
OpenJPA
MySQL server
Basic Person Test5.70.985.71.75.71.4
Element Collection Test0.0250.0099stopped0.650.0120.33
Inheritance Test5.50.0335.41.55.40.75
Indexing Test10.40.6410.02.010.21.3
Graph (Binary Tree) Test0.0160.410.0130.430.0150.42
Multithreading Test26.30.2716.82.921.61.6
All Tests8.00.396.31.57.20.96

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
 EclipseLink
PostgreSQL server
OpenJPA
MySQL server
EclipseLink
PostgreSQL server
OpenJPA
MySQL server
EclipseLink
PostgreSQL server
OpenJPA
MySQL server
Basic Person Test16.33.67.86.012.14.8
Element Collection Test3.71.30.401.42.11.3
Inheritance Test15.91.09.52.512.71.8
Indexing Test6.51.910.76.68.64.3
Graph (Binary Tree) Test1.20.451.10.401.20.43
Multithreading Test32.62.016.05.524.33.8
All Tests13.11.87.83.910.52.8

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