Compare with

Comparison of DataNucleus with MySQL server vs Hibernate with Derby 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
 DataNucleus
MySQL server
Hibernate
Derby embedded
DataNucleus
MySQL server
Hibernate
Derby embedded
DataNucleus
MySQL server
Hibernate
Derby embedded
Basic Person Test2.65.91.43.82.04.9
Element Collection Test1.02.90.481.80.762.3
Inheritance Test2.55.31.33.71.94.5
Indexing Test4.07.02.54.83.35.9
Graph (Binary Tree) Test1.11.90.991.71.11.8
Multithreading Test6.210.52.53.74.47.1
All Tests2.95.61.53.32.24.4

The results above show that in general Hibernate with Derby embedded is more efficient than DataNucleus with MySQL server in persisting JPA entity objects to the database. Comparing the normalized speed of DataNucleus with MySQL database server (2.2) to the normalized speed of Hibernate with Derby embedded database (4.4) reveals that in these tests, Hibernate with Derby embedded is 2.0 times faster than DataNucleus with MySQL server.

A large performance gap has been detected when using JPA element collections with large transaction size. Comparing the normalized speed of DataNucleus with MySQL database server (0.48) to the normalized speed of Hibernate with Derby embedded database (1.8) reveals that in that case, Hibernate with Derby embedded is 3.8 times faster than DataNucleus with MySQL server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
MySQL server
Hibernate
Derby embedded
DataNucleus
MySQL server
Hibernate
Derby embedded
DataNucleus
MySQL server
Hibernate
Derby embedded
Basic Person Test0.9614.29.316.45.115.3
Element Collection Test0.184.40.774.90.474.6
Inheritance Test0.5510.38.518.64.514.4
Indexing Test0.8210.09.716.45.313.2
Graph (Binary Tree) Test2.12.63.53.02.82.8
Multithreading Test0.2719.37.819.34.019.3
All Tests0.8110.16.613.13.711.6

The results above show that in general Hibernate with Derby embedded is much more efficient than DataNucleus with MySQL server in retrieving JPA entity objects from the database. Comparing the normalized speed of DataNucleus with MySQL database server (3.7) to the normalized speed of Hibernate with Derby embedded database (11.6) reveals that in these tests, Hibernate with Derby embedded is 3.1 times faster than DataNucleus with MySQL server.

A huge performance gap has been detected when using multithreading with small retrieval size. Comparing the normalized speed of DataNucleus with MySQL database server (0.27) to the normalized speed of Hibernate with Derby embedded database (19.3) reveals that in that case, Hibernate with Derby embedded is 71.5 times faster than DataNucleus with MySQL server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
MySQL server
Hibernate
Derby embedded
DataNucleus
MySQL server
Hibernate
Derby embedded
DataNucleus
MySQL server
Hibernate
Derby embedded
Basic Person Test7.249.32.26.84.728.1
Element Collection Test5.837.60.272.73.120.1
Inheritance Test2.924.11.77.62.315.9
Indexing Test0.00845.32.514.81.210.1
Multithreading Testfailed39.7failed6.1failed22.9
All Tests4.031.21.77.62.819.4

DataNucleus with MySQL server has failed in 2 tests (see exceptions).

The results above show that in general Hibernate with Derby embedded is much more efficient than DataNucleus with MySQL server in executing the tested JPA queries. Comparing the normalized speed of DataNucleus with MySQL database server (2.8) to the normalized speed of Hibernate with Derby embedded database (19.4) reveals that in these tests, Hibernate with Derby embedded is 6.9 times faster than DataNucleus with MySQL server.

A huge performance gap has been detected when using database indexes with small retrieval size. Comparing the normalized speed of DataNucleus with MySQL database server (0.0084) to the normalized speed of Hibernate with Derby embedded database (5.3) reveals that in that case, Hibernate with Derby embedded is 631 times faster than DataNucleus with MySQL server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
MySQL server
Hibernate
Derby embedded
DataNucleus
MySQL server
Hibernate
Derby embedded
DataNucleus
MySQL server
Hibernate
Derby embedded
Basic Person Test0.614.51.13.20.883.8
Element Collection Test0.313.90.443.10.383.5
Inheritance Test0.514.61.84.51.14.5
Indexing Test0.684.62.25.51.55.1
Graph (Binary Tree) Test0.912.70.471.20.692.0
Multithreading Test0.6411.6failed2.60.647.1
All Tests0.615.31.23.30.884.3

DataNucleus with MySQL server has failed in 1 tests (see exceptions).

The results above show that in general Hibernate with Derby embedded is much more efficient than DataNucleus with MySQL server in updating JPA entity objects in the database. Comparing the normalized speed of DataNucleus with MySQL database server (0.88) to the normalized speed of Hibernate with Derby embedded database (4.3) reveals that in these tests, Hibernate with Derby embedded is 4.9 times faster than DataNucleus with MySQL server.

A huge performance gap has been detected when using multithreading with small transaction size. Comparing the normalized speed of DataNucleus with MySQL database server (0.64) to the normalized speed of Hibernate with Derby embedded database (11.6) reveals that in that case, Hibernate with Derby embedded is 18.1 times faster than DataNucleus with MySQL server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
MySQL server
Hibernate
Derby embedded
DataNucleus
MySQL server
Hibernate
Derby embedded
DataNucleus
MySQL server
Hibernate
Derby embedded
Basic Person Test0.703.81.34.21.04.0
Element Collection Test0.172.30.401.50.291.9
Inheritance Test0.414.01.34.30.874.2
Indexing Test1.75.51.93.61.84.6
Graph (Binary Tree) Test0.490.740.460.960.470.85
Multithreading Testfailed5.6failed4.9failed5.3
All Tests0.693.71.13.30.893.5

DataNucleus with MySQL server has failed in 2 tests (see exceptions).

The results above show that in general Hibernate with Derby embedded is much more efficient than DataNucleus with MySQL server in deleting JPA entity objects from the database. Comparing the normalized speed of DataNucleus with MySQL database server (0.89) to the normalized speed of Hibernate with Derby embedded database (3.5) reveals that in these tests, Hibernate with Derby embedded is 3.9 times faster than DataNucleus with MySQL server.

A huge performance gap has been detected when using JPA element collections with small transaction size. Comparing the normalized speed of DataNucleus with MySQL database server (0.17) to the normalized speed of Hibernate with Derby embedded database (2.3) reveals that in that case, Hibernate with Derby embedded is 13.5 times faster than DataNucleus with MySQL server.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 DataNucleus
MySQL server
Hibernate
Derby embedded
DataNucleus
MySQL server
Hibernate
Derby embedded
DataNucleus
MySQL server
Hibernate
Derby embedded
Basic Person Test2.415.53.16.92.711.2
Element Collection Test1.510.20.472.80.996.5
Inheritance Test1.49.72.97.72.18.7
Indexing Test1.46.53.89.02.67.8
Graph (Binary Tree) Test1.22.01.41.71.31.8
Multithreading Test2.417.35.17.33.512.3
All Tests1.710.52.66.12.18.3

The results above show that in general Hibernate with Derby embedded is much more efficient than DataNucleus with MySQL server in performing JPA database operations. Comparing the normalized speed of DataNucleus with MySQL database server (2.1) to the normalized speed of Hibernate with Derby embedded database (8.3) reveals that in these tests, Hibernate with Derby embedded is 4.0 times faster than DataNucleus with MySQL server.

A large performance gap has been detected when using multithreading with small transaction/retrieval size. Comparing the normalized speed of DataNucleus with MySQL database server (2.4) to the normalized speed of Hibernate with Derby embedded database (17.3) reveals that in that case, Hibernate with Derby embedded is 7.2 times faster than DataNucleus with MySQL server.

Other Head to Head DBMS/JPA Comparisons