Compare with

Comparison of OpenJPA with MySQL server vs EclipseLink with SQLite embedded

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
SQLite embedded
OpenJPA
MySQL server
EclipseLink
SQLite embedded
OpenJPA
MySQL server
EclipseLink
SQLite embedded
Basic Person Test3.90.0741.60.902.70.49
Element Collection Test1.60.0610.680.651.10.36
Inheritance Test3.60.0831.40.822.50.45
Indexing Test5.60.112.41.64.00.87
Graph (Binary Tree) Test0.680.240.570.910.630.57
Multithreading Test7.20.102.72.14.91.1
All Tests3.70.111.51.22.60.64

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

A huge performance gap has been detected when using multithreading with small transaction size. Comparing the normalized speed of EclipseLink with SQLite embedded database (0.10) to the normalized speed of OpenJPA with MySQL database server (7.2) reveals that in that case, OpenJPA with MySQL server is 72.0 times faster than EclipseLink with SQLite embedded.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
MySQL server
EclipseLink
SQLite embedded
OpenJPA
MySQL server
EclipseLink
SQLite embedded
OpenJPA
MySQL server
EclipseLink
SQLite embedded
Basic Person Test3.2failed22.7failed12.9failed
Element Collection Test0.00380.00072.9failed1.40.0007
Inheritance Test0.017failed6.9failed3.4failed
Indexing Test2.4failed23.4failed12.9failed
Graph (Binary Tree) Test0.27failed0.35failed0.31failed
Multithreading Test0.14failed18.1failed9.1failed
All Tests1.00.000712.4failed6.70.0007

EclipseLink with SQLite embedded has failed in 11 tests (see exceptions).

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
MySQL server
EclipseLink
SQLite embedded
OpenJPA
MySQL server
EclipseLink
SQLite embedded
OpenJPA
MySQL server
EclipseLink
SQLite embedded
Basic Person Test9.31.22.2failed5.81.2
Element Collection Test4.80.291.1failed2.90.29
Inheritance Test1.50.690.90failed1.20.69
Indexing Test0.310.00082.1failed1.20.0008
Multithreading Test1.9failed0.99failed1.4failed
All Tests3.60.551.5failed2.50.55

EclipseLink with SQLite embedded has failed in 6 tests (see exceptions).

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
MySQL server
EclipseLink
SQLite embedded
OpenJPA
MySQL server
EclipseLink
SQLite embedded
OpenJPA
MySQL server
EclipseLink
SQLite embedded
Basic Person Test0.74failed1.6failed1.2failed
Element Collection Test0.0140.00161.7failed0.870.0016
Inheritance Test0.048failed2.0failed1.0failed
Indexing Test0.74failed3.0failed1.9failed
Graph (Binary Tree) Test0.45failed0.25failed0.35failed
Multithreading Test0.55failed2.9failed1.7failed
All Tests0.420.00161.9failed1.20.0016

EclipseLink with SQLite embedded has failed in 11 tests (see exceptions).

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
MySQL server
EclipseLink
SQLite embedded
OpenJPA
MySQL server
EclipseLink
SQLite embedded
OpenJPA
MySQL server
EclipseLink
SQLite embedded
Basic Person Test0.98failed1.7failed1.4failed
Element Collection Test0.00990.00060.65failed0.330.0006
Inheritance Test0.033failed1.5failed0.75failed
Indexing Test0.64failed2.0failed1.3failed
Graph (Binary Tree) Test0.41failed0.43failed0.42failed
Multithreading Test0.27failed2.9failed1.6failed
All Tests0.390.00061.5failed0.960.0006

EclipseLink with SQLite embedded has failed in 11 tests (see exceptions).

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 OpenJPA
MySQL server
EclipseLink
SQLite embedded
OpenJPA
MySQL server
EclipseLink
SQLite embedded
OpenJPA
MySQL server
EclipseLink
SQLite embedded
Basic Person Test3.60.666.00.904.80.74
Element Collection Test1.30.0701.40.651.30.17
Inheritance Test1.00.382.50.821.80.53
Indexing Test1.90.0586.61.64.30.58
Graph (Binary Tree) Test0.450.240.400.910.430.57
Multithreading Test2.00.105.52.13.81.1
All Tests1.80.223.91.22.80.52

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

A huge performance gap has been detected when using database indexes with small transaction/retrieval size. Comparing the normalized speed of EclipseLink with SQLite embedded database (0.058) to the normalized speed of OpenJPA with MySQL database server (1.9) reveals that in that case, OpenJPA with MySQL server is 32.8 times faster than EclipseLink with SQLite embedded.

On the other hand, OpenJPA with MySQL server is slower, for instance, when using graphs of objects with large transaction/retrieval size. Comparing the normalized speed of OpenJPA with MySQL database server (0.40) to the normalized speed of EclipseLink with SQLite embedded database (0.91) reveals that in that case, OpenJPA with MySQL server is 2.3 times slower than EclipseLink with SQLite embedded.

Other Head to Head DBMS/JPA Comparisons