Compare with

Comparison of DataNucleus with Derby server vs Hibernate 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
 DataNucleus
Derby server
Hibernate
MySQL server
DataNucleus
Derby server
Hibernate
MySQL server
DataNucleus
Derby server
Hibernate
MySQL server
Basic Person Test2.83.62.31.62.62.6
Element Collection Test0.711.60.350.720.531.1
Inheritance Test2.73.72.01.62.32.7
Indexing Test4.55.44.02.64.34.0
Graph (Binary Tree) Test0.621.50.531.20.571.4
Multithreading Test4.97.43.42.94.15.2
All Tests2.73.92.11.82.42.8

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

A large performance gap has been detected when using graphs of objects with small transaction size. Comparing the normalized speed of DataNucleus with Derby database server (0.62) to the normalized speed of Hibernate with MySQL database server (1.5) reveals that in that case, Hibernate with MySQL server is 2.4 times faster than DataNucleus with Derby server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
Derby server
Hibernate
MySQL server
DataNucleus
Derby server
Hibernate
MySQL server
DataNucleus
Derby server
Hibernate
MySQL server
Basic Person Test0.563.06.311.03.47.0
Element Collection Test0.360.340.931.20.640.79
Inheritance Test0.451.36.814.53.67.9
Indexing Test0.502.57.112.83.87.6
Graph (Binary Tree) Test0.220.556.60.713.40.63
Multithreading Test1.20.2310.013.85.67.0
All Tests0.551.36.39.03.45.2

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

A large performance gap has been detected when using simple basic entities with small retrieval size. Comparing the normalized speed of DataNucleus with Derby database server (0.56) to the normalized speed of Hibernate with MySQL database server (3.0) reveals that in that case, Hibernate with MySQL server is 5.4 times faster than DataNucleus with Derby server.

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
Derby server
Hibernate
MySQL server
DataNucleus
Derby server
Hibernate
MySQL server
DataNucleus
Derby server
Hibernate
MySQL server
Basic Person Test37.710.03.62.020.76.0
Element Collection Test25.96.71.40.5313.63.6
Inheritance Test6.52.81.81.64.22.2
Indexing Test0.0300.444.92.02.51.2
Multithreading Testfailed2.1failed0.98failed1.5
All Tests17.54.42.91.410.22.9

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

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

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

On the other hand, DataNucleus with Derby server is slower, for instance, when using database indexes with small retrieval size. Comparing the normalized speed of DataNucleus with Derby database server (0.030) to the normalized speed of Hibernate with MySQL database server (0.44) reveals that in that case, DataNucleus with Derby server is 14.7 times slower than Hibernate with MySQL server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
Derby server
Hibernate
MySQL server
DataNucleus
Derby server
Hibernate
MySQL server
DataNucleus
Derby server
Hibernate
MySQL server
Basic Person Test1.10.730.851.60.991.2
Element Collection Test0.810.390.621.20.710.78
Inheritance Test1.20.611.32.11.21.4
Indexing Test1.20.811.52.61.31.7
Graph (Binary Tree) Test0.290.690.410.400.350.54
Multithreading Testfailed0.63failed3.0failed1.8
All Tests0.930.640.921.80.921.2

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

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

A large performance gap has been detected when using graphs of objects with small transaction size. Comparing the normalized speed of DataNucleus with Derby database server (0.29) to the normalized speed of Hibernate with MySQL database server (0.69) reveals that in that case, Hibernate with MySQL server is 2.4 times faster than DataNucleus with Derby server.

On the other hand, Hibernate with MySQL server is slower, for instance, when using JPA element collections with small transaction size. Comparing the normalized speed of Hibernate with MySQL database server (0.39) to the normalized speed of DataNucleus with Derby database server (0.81) reveals that in that case, Hibernate with MySQL server is 2.1 times slower than DataNucleus with Derby server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
Derby server
Hibernate
MySQL server
DataNucleus
Derby server
Hibernate
MySQL server
DataNucleus
Derby server
Hibernate
MySQL server
Basic Person Test1.31.11.31.71.31.4
Element Collection Test0.610.210.330.530.470.37
Inheritance Test1.00.651.31.81.21.2
Indexing Test2.30.811.92.02.11.4
Graph (Binary Tree) Test0.260.550.460.620.360.58
Multithreading Testfailed0.35failed4.1failed2.2
All Tests1.10.611.11.81.11.2

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

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

A large performance gap has been detected when using graphs of objects with small transaction size. Comparing the normalized speed of DataNucleus with Derby database server (0.26) to the normalized speed of Hibernate with MySQL database server (0.55) reveals that in that case, Hibernate with MySQL server is 2.1 times faster than DataNucleus with Derby server.

On the other hand, Hibernate with MySQL server is slower, for instance, when using JPA element collections with small transaction size. Comparing the normalized speed of Hibernate with MySQL database server (0.21) to the normalized speed of DataNucleus with Derby database server (0.61) reveals that in that case, Hibernate with MySQL server is 2.9 times slower than DataNucleus with Derby server.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 DataNucleus
Derby server
Hibernate
MySQL server
DataNucleus
Derby server
Hibernate
MySQL server
DataNucleus
Derby server
Hibernate
MySQL server
Basic Person Test8.73.72.93.65.83.6
Element Collection Test5.71.80.720.843.21.3
Inheritance Test2.41.82.64.32.53.1
Indexing Test1.72.03.94.42.83.2
Graph (Binary Tree) Test0.350.832.00.731.20.78
Multithreading Test3.02.16.75.04.93.6
All Tests3.82.12.83.23.32.7

The results above show that in general DataNucleus with Derby server is slightly more efficient than Hibernate with MySQL server in performing JPA database operations.

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

On the other hand, DataNucleus with Derby server is slower, for instance, when using graphs of objects with small transaction/retrieval size. Comparing the normalized speed of DataNucleus with Derby database server (0.35) to the normalized speed of Hibernate with MySQL database server (0.83) reveals that in that case, DataNucleus with Derby server is 2.4 times slower than Hibernate with MySQL server.

Other Head to Head DBMS/JPA Comparisons