Compare with

Comparison of DataNucleus with MySQL server vs Hibernate with HSQLDB 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
MySQL server
Hibernate
HSQLDB server
DataNucleus
MySQL server
Hibernate
HSQLDB server
DataNucleus
MySQL server
Hibernate
HSQLDB server
Basic Person Test1.4stopped6.3stopped3.9stopped
Element Collection Test1.5stopped3.2stopped2.3stopped
Inheritance Test0.83stopped6.2stopped3.5stopped
Indexing Test1.8stopped6.9stopped4.3stopped
Graph (Binary Tree) Test2.3stopped3.2stopped2.8stopped
Multithreading Test2.0stopped0.0000stopped1.0stopped
All Tests1.6stopped4.3stopped3.0stopped

The results above show that in general DataNucleus with MySQL server is much more efficient than Hibernate with HSQLDB server in persisting JPA entity objects to the database. Comparing the normalized speed of Hibernate with HSQLDB database server (0.0000) to the normalized speed of DataNucleus with MySQL database server (3.0) reveals that in these tests, DataNucleus with MySQL server is ? times faster than Hibernate with HSQLDB server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
MySQL server
Hibernate
HSQLDB server
DataNucleus
MySQL server
Hibernate
HSQLDB server
DataNucleus
MySQL server
Hibernate
HSQLDB server
Basic Person Test0.72stopped5.5stopped3.1stopped
Element Collection Test0.38stopped1.1stopped0.75stopped
Inheritance Test0.66stopped4.3stopped2.5stopped
Indexing Test0.60stopped7.0stopped3.8stopped
Graph (Binary Tree) Test1.6stopped3.8stopped2.7stopped
Multithreading Test0.72stopped2.0stopped1.4stopped
All Tests0.78stopped4.0stopped2.4stopped

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
MySQL server
Hibernate
HSQLDB server
DataNucleus
MySQL server
Hibernate
HSQLDB server
DataNucleus
MySQL server
Hibernate
HSQLDB server
Basic Person Test0.085stopped0.59stopped0.34stopped
Element Collection Test0.32stopped0.51stopped0.42stopped
Inheritance Test0.18stopped0.79stopped0.49stopped
Indexing Test0.094stopped1.1stopped0.59stopped
Multithreading Testfailedstoppedfailedstoppedfailedstopped
All Tests0.17stopped0.74stopped0.46stopped

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

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
MySQL server
Hibernate
HSQLDB server
DataNucleus
MySQL server
Hibernate
HSQLDB server
DataNucleus
MySQL server
Hibernate
HSQLDB server
Basic Person Test0.15stopped0.54stopped0.34stopped
Element Collection Test0.25stopped0.54stopped0.40stopped
Inheritance Test0.16stopped0.81stopped0.48stopped
Indexing Test0.43stopped0.84stopped0.64stopped
Graph (Binary Tree) Test0.35stopped0.27stopped0.31stopped
Multithreading Testfailedstoppedfailedstoppedfailedstopped
All Tests0.27stopped0.60stopped0.44stopped

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

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
MySQL server
Hibernate
HSQLDB server
DataNucleus
MySQL server
Hibernate
HSQLDB server
DataNucleus
MySQL server
Hibernate
HSQLDB server
Basic Person Test0.88stopped0.81stopped0.84stopped
Element Collection Test1.1stopped0.25stopped0.68stopped
Inheritance Test1.1stopped0.59stopped0.83stopped
Indexing Test1.7stopped0.57stopped1.2stopped
Graph (Binary Tree) Test3.3stopped5.2stopped4.3stopped
Multithreading Test0.94stopped0.0000stopped0.47stopped
All Tests1.5stopped1.2stopped1.4stopped

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

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 DataNucleus
MySQL server
Hibernate
HSQLDB server
DataNucleus
MySQL server
Hibernate
HSQLDB server
DataNucleus
MySQL server
Hibernate
HSQLDB server
Basic Person Test0.64stopped2.8stopped1.7stopped
Element Collection Test0.71stopped1.1stopped0.92stopped
Inheritance Test0.58stopped2.5stopped1.6stopped
Indexing Test0.92stopped3.3stopped2.1stopped
Graph (Binary Tree) Test1.9stopped3.1stopped2.5stopped
Multithreading Test1.2stopped0.68stopped0.96stopped
All Tests0.95stopped2.3stopped1.6stopped

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

A huge performance gap has been detected when using simple basic entities with small transaction/retrieval size. Comparing the normalized speed of Hibernate with HSQLDB database server (0.0000) to the normalized speed of DataNucleus with MySQL database server (0.64) reveals that in that case, DataNucleus with MySQL server is ? times faster than Hibernate with HSQLDB server.

Other Head to Head DBMS/JPA Comparisons