Compare with

Comparison of EclipseLink with SQLite embedded 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
SQLite embedded
OpenJPA
MySQL server
EclipseLink
SQLite embedded
OpenJPA
MySQL server
EclipseLink
SQLite embedded
OpenJPA
MySQL server
Basic Person Test0.0743.90.901.60.492.7
Element Collection Test0.0611.60.650.680.361.1
Inheritance Test0.0833.60.821.40.452.5
Indexing Test0.115.61.62.40.874.0
Graph (Binary Tree) Test0.240.680.910.570.570.63
Multithreading Test0.107.22.12.71.14.9
All Tests0.113.71.21.50.642.6

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
 EclipseLink
SQLite embedded
OpenJPA
MySQL server
EclipseLink
SQLite embedded
OpenJPA
MySQL server
EclipseLink
SQLite embedded
OpenJPA
MySQL server
Basic Person Testfailed3.2failed22.7failed12.9
Element Collection Test0.00070.0038failed2.90.00071.4
Inheritance Testfailed0.017failed6.9failed3.4
Indexing Testfailed2.4failed23.4failed12.9
Graph (Binary Tree) Testfailed0.27failed0.35failed0.31
Multithreading Testfailed0.14failed18.1failed9.1
All Tests0.00071.0failed12.40.00076.7

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
 EclipseLink
SQLite embedded
OpenJPA
MySQL server
EclipseLink
SQLite embedded
OpenJPA
MySQL server
EclipseLink
SQLite embedded
OpenJPA
MySQL server
Basic Person Test1.29.3failed2.21.25.8
Element Collection Test0.294.8failed1.10.292.9
Inheritance Test0.691.5failed0.900.691.2
Indexing Test0.00080.31failed2.10.00081.2
Multithreading Testfailed1.9failed0.99failed1.4
All Tests0.553.6failed1.50.552.5

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
 EclipseLink
SQLite embedded
OpenJPA
MySQL server
EclipseLink
SQLite embedded
OpenJPA
MySQL server
EclipseLink
SQLite embedded
OpenJPA
MySQL server
Basic Person Testfailed0.74failed1.6failed1.2
Element Collection Test0.00160.014failed1.70.00160.87
Inheritance Testfailed0.048failed2.0failed1.0
Indexing Testfailed0.74failed3.0failed1.9
Graph (Binary Tree) Testfailed0.45failed0.25failed0.35
Multithreading Testfailed0.55failed2.9failed1.7
All Tests0.00160.42failed1.90.00161.2

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
 EclipseLink
SQLite embedded
OpenJPA
MySQL server
EclipseLink
SQLite embedded
OpenJPA
MySQL server
EclipseLink
SQLite embedded
OpenJPA
MySQL server
Basic Person Testfailed0.98failed1.7failed1.4
Element Collection Test0.00060.0099failed0.650.00060.33
Inheritance Testfailed0.033failed1.5failed0.75
Indexing Testfailed0.64failed2.0failed1.3
Graph (Binary Tree) Testfailed0.41failed0.43failed0.42
Multithreading Testfailed0.27failed2.9failed1.6
All Tests0.00060.39failed1.50.00060.96

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
 EclipseLink
SQLite embedded
OpenJPA
MySQL server
EclipseLink
SQLite embedded
OpenJPA
MySQL server
EclipseLink
SQLite embedded
OpenJPA
MySQL server
Basic Person Test0.663.60.906.00.744.8
Element Collection Test0.0701.30.651.40.171.3
Inheritance Test0.381.00.822.50.531.8
Indexing Test0.0581.91.66.60.584.3
Graph (Binary Tree) Test0.240.450.910.400.570.43
Multithreading Test0.102.02.15.51.13.8
All Tests0.221.81.23.90.522.8

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