Compare with

Comparison of Hibernate with Derby server vs DataNucleus 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
 Hibernate
Derby server
DataNucleus
MySQL server
Hibernate
Derby server
DataNucleus
MySQL server
Hibernate
Derby server
DataNucleus
MySQL server
Basic Person Test3.82.63.01.43.42.0
Element Collection Test2.01.01.30.481.70.76
Inheritance Test3.42.53.01.33.21.9
Indexing Test4.84.04.12.54.43.3
Graph (Binary Tree) Test1.81.11.60.991.71.1
Multithreading Test6.96.23.92.55.44.4
All Tests3.82.92.81.53.32.2

The results above show that in general Hibernate with Derby server is more efficient than DataNucleus with MySQL server in persisting JPA entity objects to the database.

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 database server (1.3) reveals that in that case, Hibernate with Derby server is 2.7 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
 Hibernate
Derby server
DataNucleus
MySQL server
Hibernate
Derby server
DataNucleus
MySQL server
Hibernate
Derby server
DataNucleus
MySQL server
Basic Person Test3.80.968.49.36.15.1
Element Collection Test1.00.181.00.771.00.47
Inheritance Test3.50.559.78.56.64.5
Indexing Test3.20.829.59.76.45.3
Graph (Binary Tree) Test0.912.11.23.51.12.8
Multithreading Test7.80.2713.47.810.64.0
All Tests3.40.817.26.65.33.7

The results above show that in general Hibernate with Derby server is more efficient than DataNucleus with MySQL server in retrieving JPA entity objects from the database.

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 database server (7.8) reveals that in that case, Hibernate with Derby server is 28.9 times faster than DataNucleus with MySQL server.

On the other hand, Hibernate with Derby server is slower, for instance, when using graphs of objects with large retrieval size. Comparing the normalized speed of Hibernate with Derby database server (1.2) to the normalized speed of DataNucleus with MySQL database server (3.5) reveals that in that case, Hibernate with Derby server is 2.9 times slower than DataNucleus with MySQL server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
Derby server
DataNucleus
MySQL server
Hibernate
Derby server
DataNucleus
MySQL server
Hibernate
Derby server
DataNucleus
MySQL server
Basic Person Test34.07.24.12.219.14.7
Element Collection Test33.85.80.640.2717.23.1
Inheritance Test20.52.95.01.712.82.3
Indexing Test2.00.00849.22.55.61.2
Multithreading Test36.2failed5.1failed20.6failed
All Tests25.34.04.81.715.12.8

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

The results above show that in general Hibernate with Derby server 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 database server (15.1) reveals that in these tests, Hibernate with Derby server is 5.4 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 database server (2.0) reveals that in that case, Hibernate with Derby server is 238 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
 Hibernate
Derby server
DataNucleus
MySQL server
Hibernate
Derby server
DataNucleus
MySQL server
Hibernate
Derby server
DataNucleus
MySQL server
Basic Person Test2.90.612.51.12.70.88
Element Collection Test2.30.311.50.441.90.38
Inheritance Test2.90.513.51.83.21.1
Indexing Test3.00.684.22.23.61.5
Graph (Binary Tree) Test1.20.910.580.470.910.69
Multithreading Test6.80.642.5failed4.60.64
All Tests3.20.612.51.22.80.88

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

The results above show that in general Hibernate with Derby server 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 database server (2.8) reveals that in these tests, Hibernate with Derby server is 3.2 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 database server (6.8) reveals that in that case, Hibernate with Derby server is 10.6 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
 Hibernate
Derby server
DataNucleus
MySQL server
Hibernate
Derby server
DataNucleus
MySQL server
Hibernate
Derby server
DataNucleus
MySQL server
Basic Person Test2.90.703.51.33.21.0
Element Collection Test1.70.170.870.401.30.29
Inheritance Test2.90.413.61.33.20.87
Indexing Test3.71.73.61.93.71.8
Graph (Binary Tree) Test0.690.490.700.460.700.47
Multithreading Test6.2failed5.1failed5.6failed
All Tests3.00.692.91.13.00.89

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

The results above show that in general Hibernate with Derby server 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 database server (3.0) reveals that in these tests, Hibernate with Derby server is 3.4 times faster than DataNucleus with MySQL server.

A large 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 database server (1.7) reveals that in that case, Hibernate with Derby server is 10.0 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
 Hibernate
Derby server
DataNucleus
MySQL server
Hibernate
Derby server
DataNucleus
MySQL server
Hibernate
Derby server
DataNucleus
MySQL server
Basic Person Test9.52.44.33.16.92.7
Element Collection Test8.21.51.10.474.60.99
Inheritance Test6.61.45.02.95.82.1
Indexing Test3.31.46.13.84.72.6
Graph (Binary Tree) Test1.21.21.01.41.11.3
Multithreading Test12.82.46.05.19.43.5
All Tests7.11.74.02.65.62.1

The results above show that in general Hibernate with Derby server is 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 database server (5.6) reveals that in these tests, Hibernate with Derby server is 2.7 times faster than DataNucleus with MySQL server.

A large performance gap has been detected when using JPA element collections with small transaction/retrieval size. Comparing the normalized speed of DataNucleus with MySQL database server (1.5) to the normalized speed of Hibernate with Derby database server (8.2) reveals that in that case, Hibernate with Derby server is 5.5 times faster than DataNucleus with MySQL server.

Other Head to Head DBMS/JPA Comparisons