Compare with

Comparison of DataNucleus with MySQL server vs Hibernate with HSQLDB 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
HSQLDB embedded
DataNucleus
MySQL server
Hibernate
HSQLDB embedded
DataNucleus
MySQL server
Hibernate
HSQLDB embedded
Basic Person Test2.632.61.413.12.022.9
Element Collection Test1.015.10.488.20.7611.7
Inheritance Test2.525.51.313.61.919.5
Indexing Test4.029.62.518.83.324.2
Graph (Binary Tree) Test1.113.80.9915.61.114.7
Multithreading Test6.237.42.513.04.425.2
All Tests2.925.61.513.72.219.7

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

A huge 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 HSQLDB embedded database (8.2) reveals that in that case, Hibernate with HSQLDB embedded is 17.1 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
HSQLDB embedded
DataNucleus
MySQL server
Hibernate
HSQLDB embedded
DataNucleus
MySQL server
Hibernate
HSQLDB embedded
Basic Person Test0.9624.89.316.45.120.6
Element Collection Test0.1811.30.7710.80.4711.0
Inheritance Test0.5521.78.521.04.521.3
Indexing Test0.8211.99.721.55.316.7
Graph (Binary Tree) Test2.13.63.54.72.84.1
Multithreading Test0.2719.87.821.54.020.6
All Tests0.8115.56.616.03.715.7

The results above show that in general Hibernate with HSQLDB 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 HSQLDB embedded database (15.7) reveals that in these tests, Hibernate with HSQLDB embedded is 4.2 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 HSQLDB embedded database (19.8) reveals that in that case, Hibernate with HSQLDB embedded is 73.3 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
HSQLDB embedded
DataNucleus
MySQL server
Hibernate
HSQLDB embedded
DataNucleus
MySQL server
Hibernate
HSQLDB embedded
Basic Person Test7.23.62.20.884.72.2
Element Collection Test5.83.40.271.73.12.6
Inheritance Test2.92.91.71.02.31.9
Indexing Test0.00849.92.521.71.215.8
Multithreading Testfailed1.1failed0.58failed0.82
All Tests4.04.21.75.22.84.7

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

The results above show that in general Hibernate with HSQLDB embedded is more efficient than DataNucleus with MySQL server in executing the tested JPA queries.

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 HSQLDB embedded database (9.9) reveals that in that case, Hibernate with HSQLDB embedded is 1,179 times faster than DataNucleus with MySQL server.

On the other hand, Hibernate with HSQLDB embedded is slower, for instance, when using simple basic entities with large retrieval size. Comparing the normalized speed of Hibernate with HSQLDB embedded database (0.88) to the normalized speed of DataNucleus with MySQL database server (2.2) reveals that in that case, Hibernate with HSQLDB embedded is 2.5 times slower 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
HSQLDB embedded
DataNucleus
MySQL server
Hibernate
HSQLDB embedded
DataNucleus
MySQL server
Hibernate
HSQLDB embedded
Basic Person Test0.6114.21.15.00.889.6
Element Collection Test0.3110.10.445.60.387.8
Inheritance Test0.5113.41.87.51.110.5
Indexing Test0.6810.72.26.11.58.4
Graph (Binary Tree) Test0.913.70.472.50.693.1
Multithreading Test0.6423.9failed3.80.6413.9
All Tests0.6112.71.25.10.888.9

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

The results above show that in general Hibernate with HSQLDB 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 HSQLDB embedded database (8.9) reveals that in these tests, Hibernate with HSQLDB embedded is 10.1 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 HSQLDB embedded database (23.9) reveals that in that case, Hibernate with HSQLDB embedded is 37.3 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
HSQLDB embedded
DataNucleus
MySQL server
Hibernate
HSQLDB embedded
DataNucleus
MySQL server
Hibernate
HSQLDB embedded
Basic Person Test0.7026.11.317.51.021.8
Element Collection Test0.179.10.405.20.297.1
Inheritance Test0.4121.41.317.70.8719.6
Indexing Test1.733.01.916.31.824.7
Graph (Binary Tree) Test0.495.40.468.20.476.8
Multithreading Testfailed38.5failed28.6failed33.5
All Tests0.6922.31.115.60.8918.9

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

The results above show that in general Hibernate with HSQLDB 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 HSQLDB embedded database (18.9) reveals that in these tests, Hibernate with HSQLDB embedded is 21.2 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 HSQLDB embedded database (9.1) reveals that in that case, Hibernate with HSQLDB embedded is 53.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
HSQLDB embedded
DataNucleus
MySQL server
Hibernate
HSQLDB embedded
DataNucleus
MySQL server
Hibernate
HSQLDB embedded
Basic Person Test2.420.23.110.62.715.4
Element Collection Test1.59.80.476.30.998.0
Inheritance Test1.417.02.912.22.114.6
Indexing Test1.419.03.816.92.618.0
Graph (Binary Tree) Test1.26.61.47.81.37.2
Multithreading Test2.424.15.113.53.518.8
All Tests1.716.52.611.32.113.9

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

A huge performance gap has been detected when using database indexes with small transaction/retrieval size. Comparing the normalized speed of DataNucleus with MySQL database server (1.4) to the normalized speed of Hibernate with HSQLDB embedded database (19.0) reveals that in that case, Hibernate with HSQLDB embedded is 13.6 times faster than DataNucleus with MySQL server.

Other Head to Head DBMS/JPA Comparisons