Compare with

Comparison of Hibernate 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
 Hibernate
MySQL server
DataNucleus
SQLite embedded
Hibernate
MySQL server
DataNucleus
SQLite embedded
Hibernate
MySQL server
DataNucleus
SQLite embedded
Basic Person Test1.5 6.9 4.2 
Element Collection Test1.8 4.4 3.1 
Inheritance Test1.0 5.7 3.4 
Indexing Test1.7 8.3 5.0 
Graph (Binary Tree) Test3.4 4.3 3.9 
Multithreading Test2.6 0.0000 1.3 
All Tests2.0 4.9 3.5 

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
MySQL server
DataNucleus
SQLite embedded
Hibernate
MySQL server
DataNucleus
SQLite embedded
Hibernate
MySQL server
DataNucleus
SQLite embedded
Basic Person Test1.70.439.3 5.50.43
Element Collection Test0.57 0.59 0.58 
Inheritance Test1.7 6.5 4.1 
Indexing Test1.7 10.0 5.9 
Graph (Binary Tree) Test0.21 0.38 0.30 
Multithreading Test3.0 5.1 4.1 
All Tests1.50.435.3 3.40.43

The results above show that in general Hibernate 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 Hibernate with MySQL database server (3.4) reveals that in these tests, Hibernate with MySQL server is 7.9 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 Hibernate with MySQL database server (1.7) reveals that in that case, Hibernate with MySQL server is 4.0 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
 Hibernate
MySQL server
DataNucleus
SQLite embedded
Hibernate
MySQL server
DataNucleus
SQLite embedded
Hibernate
MySQL server
DataNucleus
SQLite embedded
Basic Person Test0.17failed1.1 0.62failed
Element Collection Test0.39 0.54 0.47 
Inheritance Test0.17 1.2 0.70 
Indexing Test1.0 3.0 2.0 
Multithreading Test1.0 2.1 1.5 
All Tests0.56failed1.6 1.1failed

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
 Hibernate
MySQL server
DataNucleus
SQLite embedded
Hibernate
MySQL server
DataNucleus
SQLite embedded
Hibernate
MySQL server
DataNucleus
SQLite embedded
Basic Person Test0.210.0250.77 0.490.025
Element Collection Test0.31 0.70 0.51 
Inheritance Test0.19 0.92 0.56 
Indexing Test0.63 1.2 0.92 
Graph (Binary Tree) Test0.30 0.24 0.27 
Multithreading Test0.23 1.4 0.81 
All Tests0.310.0250.87 0.590.025

The results above show that in general Hibernate 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 Hibernate with MySQL database server (0.59) reveals that in these tests, Hibernate with MySQL server is 23.6 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 Hibernate with MySQL database server (0.21) reveals that in that case, Hibernate with MySQL server is 8.4 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
 Hibernate
MySQL server
DataNucleus
SQLite embedded
Hibernate
MySQL server
DataNucleus
SQLite embedded
Hibernate
MySQL server
DataNucleus
SQLite embedded
Basic Person Test1.10.176.0 3.50.17
Element Collection Test1.0 0.68 0.84 
Inheritance Test1.2 3.2 2.2 
Indexing Test1.7 3.4 2.6 
Graph (Binary Tree) Test4.0 7.4 5.7 
Multithreading Test1.1 0.0000 0.54 
All Tests1.70.173.4 2.60.17

The results above show that in general Hibernate 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 Hibernate with MySQL database server (2.6) reveals that in these tests, Hibernate with MySQL server is 15.3 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 Hibernate with MySQL database server (1.1) reveals that in that case, Hibernate with MySQL server is 6.5 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
 Hibernate
MySQL server
DataNucleus
SQLite embedded
Hibernate
MySQL server
DataNucleus
SQLite embedded
Hibernate
MySQL server
DataNucleus
SQLite embedded
Basic Person Test0.930.214.8 2.90.21
Element Collection Test0.82 1.4 1.1 
Inheritance Test0.87 3.5 2.2 
Indexing Test1.3 5.2 3.3 
Graph (Binary Tree) Test2.0 3.1 2.5 
Multithreading Test1.6 1.7 1.7 
All Tests1.20.213.3 2.30.21

The results above show that in general Hibernate 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 Hibernate with MySQL database server (2.3) reveals that in these tests, Hibernate with MySQL server is 11.0 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 Hibernate with MySQL database server (0.93) reveals that in that case, Hibernate with MySQL server is 4.4 times faster than DataNucleus with SQLite embedded.

Other Head to Head DBMS/JPA Comparisons