Compare with

Comparison of OpenJPA with MySQL server vs DataNucleus 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
DataNucleus
SQLite embedded
OpenJPA
MySQL server
DataNucleus
SQLite embedded
OpenJPA
MySQL server
DataNucleus
SQLite embedded
Basic Person Test1.5 4.6 3.0 
Element Collection Test1.7 4.1 2.9 
Inheritance Test0.89 5.2 3.0 
Indexing Test1.8 6.3 4.1 
Graph (Binary Tree) Test1.8 1.6 1.7 
Multithreading Test2.1 0.0000 1.0 
All Tests1.6 3.6 2.6 

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
MySQL server
DataNucleus
SQLite embedded
OpenJPA
MySQL server
DataNucleus
SQLite embedded
OpenJPA
MySQL server
DataNucleus
SQLite embedded
Basic Person Test2.00.4314.8 8.40.43
Element Collection Test0.34 7.0 3.7 
Inheritance Test1.3 9.9 5.6 
Indexing Test1.5 18.8 10.1 
Graph (Binary Tree) Test0.14 0.17 0.15 
Multithreading Test3.2 5.0 4.1 
All Tests1.40.439.3 5.30.43

The results above show that in general OpenJPA with MySQL server is much more efficient than DataNucleus with SQLite embedded in retrieving JPA entity objects from the database. Comparing the normalized speed of DataNucleus with SQLite embedded database (0.43) to the normalized speed of OpenJPA with MySQL database server (5.3) reveals that in these tests, OpenJPA with MySQL server is 12.3 times faster than DataNucleus with SQLite embedded.

A large performance gap has been detected when using simple basic entities with small retrieval size. Comparing the normalized speed of DataNucleus with SQLite embedded database (0.43) to the normalized speed of OpenJPA with MySQL database server (2.0) reveals that in that case, OpenJPA with MySQL server is 4.7 times faster than DataNucleus with SQLite embedded.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
MySQL server
DataNucleus
SQLite embedded
OpenJPA
MySQL server
DataNucleus
SQLite embedded
OpenJPA
MySQL server
DataNucleus
SQLite embedded
Basic Person Test0.19failed1.2 0.69failed
Element Collection Test0.28 1.2 0.74 
Inheritance Test0.24 1.3 0.79 
Indexing Test1.1 4.9 3.0 
Multithreading Test1.1 2.5 1.8 
All Tests0.59failed2.2 1.4failed

DataNucleus with SQLite embedded has failed in 1 tests (see exceptions).

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
MySQL server
DataNucleus
SQLite embedded
OpenJPA
MySQL server
DataNucleus
SQLite embedded
OpenJPA
MySQL server
DataNucleus
SQLite embedded
Basic Person Test0.180.0250.69 0.430.025
Element Collection Test0.39 0.99 0.69 
Inheritance Test0.20 0.91 0.55 
Indexing Test0.59 1.1 0.86 
Graph (Binary Tree) Test0.29 0.15 0.22 
Multithreading Test0.25 1.6 0.95 
All Tests0.310.0250.92 0.620.025

The results above show that in general OpenJPA with MySQL server is much more efficient than DataNucleus with SQLite embedded in updating JPA entity objects in the database. Comparing the normalized speed of DataNucleus with SQLite embedded database (0.025) to the normalized speed of OpenJPA with MySQL database server (0.62) reveals that in these tests, OpenJPA with MySQL server is 24.8 times faster than DataNucleus with SQLite embedded.

A large performance gap has been detected when using simple basic entities with small transaction size. Comparing the normalized speed of DataNucleus with SQLite embedded database (0.025) to the normalized speed of OpenJPA with MySQL database server (0.18) reveals that in that case, OpenJPA with MySQL server is 7.2 times faster than DataNucleus with SQLite embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
MySQL server
DataNucleus
SQLite embedded
OpenJPA
MySQL server
DataNucleus
SQLite embedded
OpenJPA
MySQL server
DataNucleus
SQLite embedded
Basic Person Test1.20.175.2 3.20.17
Element Collection Test1.3 0.98 1.1 
Inheritance Test1.5 3.7 2.6 
Indexing Test2.0 2.8 2.4 
Graph (Binary Tree) Test2.9 5.0 3.9 
Multithreading Test1.1 0.0000 0.57 
All Tests1.70.173.0 2.30.17

The results above show that in general OpenJPA with MySQL server is much more efficient than DataNucleus with SQLite embedded in deleting JPA entity objects from the database. Comparing the normalized speed of DataNucleus with SQLite embedded database (0.17) to the normalized speed of OpenJPA with MySQL database server (2.3) reveals that in these tests, OpenJPA with MySQL server is 13.5 times faster than DataNucleus with SQLite embedded.

A large performance gap has been detected when using simple basic entities with small transaction size. Comparing the normalized speed of DataNucleus with SQLite embedded database (0.17) to the normalized speed of OpenJPA with MySQL database server (1.2) reveals that in that case, OpenJPA with MySQL server is 7.1 times faster than DataNucleus with SQLite embedded.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 OpenJPA
MySQL server
DataNucleus
SQLite embedded
OpenJPA
MySQL server
DataNucleus
SQLite embedded
OpenJPA
MySQL server
DataNucleus
SQLite embedded
Basic Person Test1.00.215.3 3.20.21
Element Collection Test0.79 2.9 1.8 
Inheritance Test0.82 4.2 2.5 
Indexing Test1.4 6.8 4.1 
Graph (Binary Tree) Test1.3 1.7 1.5 
Multithreading Test1.5 1.8 1.7 
All Tests1.10.213.9 2.50.21

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

A large performance gap has been detected when using simple basic entities with small transaction/retrieval size. Comparing the normalized speed of DataNucleus with SQLite embedded database (0.21) to the normalized speed of OpenJPA with MySQL database server (1.0) reveals that in that case, OpenJPA with MySQL server is 4.8 times faster than DataNucleus with SQLite embedded.

Other Head to Head DBMS/JPA Comparisons