Compare with

Comparison of EclipseLink with H2 server vs EclipseLink 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
H2 server
EclipseLink
MySQL server
EclipseLink
H2 server
EclipseLink
MySQL server
EclipseLink
H2 server
EclipseLink
MySQL server
Basic Person Test5.63.62.51.54.02.6
Element Collection Test4.21.51.50.692.81.1
Inheritance Test6.63.52.11.44.42.4
Indexing Test9.75.34.12.56.93.9
Graph (Binary Tree) Test4.71.73.51.34.11.5
Multithreading Test10.27.24.02.47.14.8
All Tests6.83.82.91.64.92.7

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

A large performance gap has been detected when using JPA element collections with small transaction size. Comparing the normalized speed of EclipseLink with MySQL database server (1.5) to the normalized speed of EclipseLink with H2 database server (4.2) reveals that in that case, EclipseLink with H2 server is 2.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
H2 server
EclipseLink
MySQL server
EclipseLink
H2 server
EclipseLink
MySQL server
EclipseLink
H2 server
EclipseLink
MySQL server
Basic Person Test5.50.438.215.56.88.0
Element Collection Test3.20.164.21.43.70.78
Inheritance Test4.70.3910.117.67.49.0
Indexing Test4.40.439.416.66.98.5
Graph (Binary Tree) Test1.10.531.90.761.50.65
Multithreading Test12.20.1915.911.014.05.6
All Tests5.20.358.310.56.75.4

The results above show that in general EclipseLink with H2 server is slightly 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 EclipseLink with H2 database server (12.2) reveals that in that case, EclipseLink with H2 server is 64.2 times faster than EclipseLink with MySQL server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
H2 server
EclipseLink
MySQL server
EclipseLink
H2 server
EclipseLink
MySQL server
EclipseLink
H2 server
EclipseLink
MySQL server
Basic Person Test3.81.51.10.442.50.95
Element Collection Test4.11.41.10.432.60.92
Inheritance Test3.21.11.30.612.30.86
Indexing Test3.00.268.00.525.50.39
Multithreading Test1.11.91.00.721.11.3
All Tests3.01.22.50.542.80.88

The results above show that in general EclipseLink with H2 server is much more efficient than EclipseLink with MySQL server in executing the tested JPA queries. Comparing the normalized speed of EclipseLink with MySQL database server (0.88) to the normalized speed of EclipseLink with H2 database server (2.8) reveals that in these tests, EclipseLink with H2 server is 3.2 times faster than EclipseLink with MySQL server.

A huge performance gap has been detected when using database indexes with large retrieval size. Comparing the normalized speed of EclipseLink with MySQL database server (0.52) to the normalized speed of EclipseLink with H2 database server (8.0) reveals that in that case, EclipseLink with H2 server is 15.4 times faster than EclipseLink with MySQL server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
H2 server
EclipseLink
MySQL server
EclipseLink
H2 server
EclipseLink
MySQL server
EclipseLink
H2 server
EclipseLink
MySQL server
Basic Person Test4.50.392.21.83.41.1
Element Collection Test3.80.232.41.43.10.83
Inheritance Test4.40.423.02.63.71.5
Indexing Test4.20.463.13.13.71.8
Graph (Binary Tree) Test1.40.670.790.411.10.54
Multithreading Test7.80.482.52.65.11.5
All Tests4.30.442.32.03.31.2

The results above show that in general EclipseLink with H2 server is 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 EclipseLink with H2 database server (3.3) reveals that in these tests, EclipseLink with H2 server is 2.8 times faster than EclipseLink with MySQL server.

A huge performance gap has been detected when using JPA element collections with small transaction size. Comparing the normalized speed of EclipseLink with MySQL database server (0.23) to the normalized speed of EclipseLink with H2 database server (3.8) reveals that in that case, EclipseLink with H2 server is 16.5 times faster than EclipseLink with MySQL server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
H2 server
EclipseLink
MySQL server
EclipseLink
H2 server
EclipseLink
MySQL server
EclipseLink
H2 server
EclipseLink
MySQL server
Basic Person Test6.40.353.11.74.81.0
Element Collection Test3.00.111.30.512.20.31
Inheritance Test5.60.292.81.64.20.94
Indexing Test10.30.463.81.97.01.2
Graph (Binary Tree) Test1.50.541.30.491.40.51
Multithreading Test7.00.314.93.66.01.9
All Tests5.60.342.91.64.30.98

The results above show that in general EclipseLink with H2 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 EclipseLink with H2 database server (4.3) reveals that in these tests, EclipseLink with H2 server is 4.4 times faster than EclipseLink with MySQL server.

A huge performance gap has been detected when using JPA element collections with small transaction size. Comparing the normalized speed of EclipseLink with MySQL database server (0.11) to the normalized speed of EclipseLink with H2 database server (3.0) reveals that in that case, EclipseLink with H2 server is 27.3 times faster than EclipseLink with MySQL server.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 EclipseLink
H2 server
EclipseLink
MySQL server
EclipseLink
H2 server
EclipseLink
MySQL server
EclipseLink
H2 server
EclipseLink
MySQL server
Basic Person Test5.21.33.44.24.32.7
Element Collection Test3.60.692.10.892.90.79
Inheritance Test4.91.13.94.84.42.9
Indexing Test6.31.45.74.96.03.2
Graph (Binary Tree) Test2.10.851.90.732.00.79
Multithreading Test7.72.05.74.06.73.0
All Tests5.11.23.83.34.52.3

The results above show that in general EclipseLink with H2 server is more efficient than EclipseLink with MySQL server in performing JPA database operations.

A large performance gap has been detected when using JPA element collections with small transaction/retrieval size. Comparing the normalized speed of EclipseLink with MySQL database server (0.69) to the normalized speed of EclipseLink with H2 database server (3.6) reveals that in that case, EclipseLink with H2 server is 5.2 times faster than EclipseLink with MySQL server.

Other Head to Head DBMS/JPA Comparisons