Compare with

Comparison of DataNucleus with H2 embedded 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 embedded
Hibernate
HSQLDB server
DataNucleus
H2 embedded
Hibernate
HSQLDB server
DataNucleus
H2 embedded
Hibernate
HSQLDB server
Basic Person Test15.2stopped8.0stopped11.6stopped
Element Collection Test9.8stopped5.2stopped7.5stopped
Inheritance Test6.2stopped12.0stopped9.1stopped
Indexing Test16.0stopped14.5stopped15.3stopped
Graph (Binary Tree) Test5.2stopped4.6stopped4.9stopped
Multithreading Test8.0stopped0.0000stopped4.0stopped
All Tests10.1stopped7.4stopped8.7stopped

The results above show that in general DataNucleus with H2 embedded 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 embedded database (8.7) reveals that in these tests, DataNucleus with H2 embedded 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 embedded
Hibernate
HSQLDB server
DataNucleus
H2 embedded
Hibernate
HSQLDB server
DataNucleus
H2 embedded
Hibernate
HSQLDB server
Basic Person Test3.9stopped8.3stopped6.1stopped
Element Collection Test2.9stopped5.8stopped4.4stopped
Inheritance Test4.1stopped12.4stopped8.2stopped
Indexing Test3.7stopped8.5stopped6.1stopped
Graph (Binary Tree) Test3.6stopped6.7stopped5.2stopped
Multithreading Test5.6stopped10.1stopped7.9stopped
All Tests4.0stopped8.6stopped6.3stopped

The results above show that in general DataNucleus with H2 embedded 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 embedded database (6.3) reveals that in these tests, DataNucleus with H2 embedded 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 embedded
Hibernate
HSQLDB server
DataNucleus
H2 embedded
Hibernate
HSQLDB server
DataNucleus
H2 embedded
Hibernate
HSQLDB server
Basic Person Test0.63stopped3.6stopped2.1stopped
Element Collection Test1.7stopped3.2stopped2.4stopped
Inheritance Test0.53stopped3.8stopped2.2stopped
Indexing Test0.63stopped2.0stopped1.3stopped
Multithreading Testfailedstoppedfailedstoppedfailedstopped
All Tests0.88stopped3.2stopped2.0stopped

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

The results above show that in general DataNucleus with H2 embedded 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 embedded database (2.0) reveals that in these tests, DataNucleus with H2 embedded 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 embedded
Hibernate
HSQLDB server
DataNucleus
H2 embedded
Hibernate
HSQLDB server
DataNucleus
H2 embedded
Hibernate
HSQLDB server
Basic Person Test7.0stopped5.9stopped6.4stopped
Element Collection Test21.8stopped6.2stopped14.0stopped
Inheritance Test12.2stopped6.2stopped9.2stopped
Indexing Test32.7stopped6.9stopped19.8stopped
Graph (Binary Tree) Test7.0stopped3.2stopped5.1stopped
Multithreading Testfailedstoppedfailedstoppedfailedstopped
All Tests16.1stopped5.7stopped10.9stopped

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

The results above show that in general DataNucleus with H2 embedded 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 embedded database (10.9) reveals that in these tests, DataNucleus with H2 embedded 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 embedded
Hibernate
HSQLDB server
DataNucleus
H2 embedded
Hibernate
HSQLDB server
DataNucleus
H2 embedded
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) Test13.5stopped26.4stopped20.0stopped
Multithreading Testfailedstopped78.6stopped78.6stopped
All Tests4.7stopped17.9stopped11.9stopped

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

The results above show that in general DataNucleus with H2 embedded 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 embedded database (11.9) reveals that in these tests, DataNucleus with H2 embedded 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 embedded
Hibernate
HSQLDB server
DataNucleus
H2 embedded
Hibernate
HSQLDB server
DataNucleus
H2 embedded
Hibernate
HSQLDB server
Basic Person Test5.7stopped5.3stopped5.5stopped
Element Collection Test7.8stopped4.1stopped5.9stopped
Inheritance Test5.0stopped7.0stopped6.0stopped
Indexing Test11.3stopped6.5stopped8.9stopped
Graph (Binary Tree) Test7.4stopped10.2stopped8.8stopped
Multithreading Test6.8stopped29.6stopped20.5stopped
All Tests7.4stopped9.1stopped8.2stopped

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

Other Head to Head DBMS/JPA Comparisons