Compare with

Comparison of DataNucleus with H2 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
H2 server
Hibernate
HSQLDB server
DataNucleus
H2 server
Hibernate
HSQLDB server
DataNucleus
H2 server
Hibernate
HSQLDB server
Basic Person Test8.5stopped15.5stopped12.0stopped
Element Collection Test5.1stopped4.1stopped4.6stopped
Inheritance Test6.9stopped15.0stopped11.0stopped
Indexing Test9.2stopped17.3stopped13.3stopped
Graph (Binary Tree) Test3.2stopped5.0stopped4.1stopped
Multithreading Test6.9stopped0.0000stopped3.5stopped
All Tests6.6stopped9.5stopped8.1stopped

The results above show that in general DataNucleus with H2 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 H2 database server (8.1) reveals that in these tests, DataNucleus with H2 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
H2 server
Hibernate
HSQLDB server
DataNucleus
H2 server
Hibernate
HSQLDB server
DataNucleus
H2 server
Hibernate
HSQLDB server
Basic Person Test0.58stopped6.4stopped3.5stopped
Element Collection Test0.39stopped0.26stopped0.33stopped
Inheritance Test0.53stopped4.0stopped2.3stopped
Indexing Test0.76stopped6.5stopped3.6stopped
Graph (Binary Tree) Test1.6stopped3.0stopped2.3stopped
Multithreading Test0.85stopped5.2stopped3.0stopped
All Tests0.79stopped4.2stopped2.5stopped

The results above show that in general DataNucleus with H2 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 H2 database server (2.5) reveals that in these tests, DataNucleus with H2 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
H2 server
Hibernate
HSQLDB server
DataNucleus
H2 server
Hibernate
HSQLDB server
DataNucleus
H2 server
Hibernate
HSQLDB server
Basic Person Test0.20stopped0.78stopped0.49stopped
Element Collection Test0.29stopped1.2stopped0.74stopped
Inheritance Test0.18stopped1.0stopped0.60stopped
Indexing Test0.16stopped0.76stopped0.46stopped
Multithreading Test0.62stoppedfailedstopped0.62stopped
All Tests0.29stopped0.93stopped0.58stopped

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

The results above show that in general DataNucleus with H2 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 H2 database server (0.58) reveals that in these tests, DataNucleus with H2 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
H2 server
Hibernate
HSQLDB server
DataNucleus
H2 server
Hibernate
HSQLDB server
DataNucleus
H2 server
Hibernate
HSQLDB server
Basic Person Test1.5stopped1.1stopped1.3stopped
Element Collection Test1.4stopped1.3stopped1.3stopped
Inheritance Test1.7stopped1.5stopped1.6stopped
Indexing Test4.0stopped1.4stopped2.7stopped
Graph (Binary Tree) Test0.92stopped0.62stopped0.77stopped
Multithreading Testfailedstoppedfailedstoppedfailedstopped
All Tests1.9stopped1.2stopped1.5stopped

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

The results above show that in general DataNucleus with H2 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 H2 database server (1.5) reveals that in these tests, DataNucleus with H2 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
H2 server
Hibernate
HSQLDB server
DataNucleus
H2 server
Hibernate
HSQLDB server
DataNucleus
H2 server
Hibernate
HSQLDB server
Basic Person Test1.8stopped0.81stopped1.3stopped
Element Collection Test2.7stopped0.25stopped1.5stopped
Inheritance Test2.1stopped0.59stopped1.3stopped
Indexing Test3.4stopped0.57stopped2.0stopped
Graph (Binary Tree) Test8.0stopped12.1stopped10.1stopped
Multithreading Testfailedstopped0.0000stopped0.0000stopped
All Tests3.6stopped2.4stopped2.9stopped

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

The results above show that in general DataNucleus with H2 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 H2 database server (2.9) reveals that in these tests, DataNucleus with H2 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
H2 server
Hibernate
HSQLDB server
DataNucleus
H2 server
Hibernate
HSQLDB server
DataNucleus
H2 server
Hibernate
HSQLDB server
Basic Person Test2.5stopped4.9stopped3.7stopped
Element Collection Test2.0stopped1.4stopped1.7stopped
Inheritance Test2.3stopped4.4stopped3.4stopped
Indexing Test3.5stopped5.3stopped4.4stopped
Graph (Binary Tree) Test3.4stopped5.2stopped4.3stopped
Multithreading Test2.8stopped1.7stopped2.3stopped
All Tests2.7stopped3.9stopped3.3stopped

The results above show that in general DataNucleus with H2 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 H2 database server (3.3) reveals that in these tests, DataNucleus with H2 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 H2 database server (2.5) reveals that in that case, DataNucleus with H2 server is ? times faster than Hibernate with HSQLDB server.

Other Head to Head DBMS/JPA Comparisons