Compare with

Comparison of Hibernate with HSQLDB server vs DataNucleus with H2 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
 Hibernate
HSQLDB server
DataNucleus
H2 server
Hibernate
HSQLDB server
DataNucleus
H2 server
Hibernate
HSQLDB server
DataNucleus
H2 server
Basic Person Teststopped8.5stopped15.5stopped12.0
Element Collection Teststopped5.1stopped4.1stopped4.6
Inheritance Teststopped6.9stopped15.0stopped11.0
Indexing Teststopped9.2stopped17.3stopped13.3
Graph (Binary Tree) Teststopped3.2stopped5.0stopped4.1
Multithreading Teststopped6.9stopped0.0000stopped3.5
All Testsstopped6.6stopped9.5stopped8.1

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
 Hibernate
HSQLDB server
DataNucleus
H2 server
Hibernate
HSQLDB server
DataNucleus
H2 server
Hibernate
HSQLDB server
DataNucleus
H2 server
Basic Person Teststopped0.58stopped6.4stopped3.5
Element Collection Teststopped0.39stopped0.26stopped0.33
Inheritance Teststopped0.53stopped4.0stopped2.3
Indexing Teststopped0.76stopped6.5stopped3.6
Graph (Binary Tree) Teststopped1.6stopped3.0stopped2.3
Multithreading Teststopped0.85stopped5.2stopped3.0
All Testsstopped0.79stopped4.2stopped2.5

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
 Hibernate
HSQLDB server
DataNucleus
H2 server
Hibernate
HSQLDB server
DataNucleus
H2 server
Hibernate
HSQLDB server
DataNucleus
H2 server
Basic Person Teststopped0.20stopped0.78stopped0.49
Element Collection Teststopped0.29stopped1.2stopped0.74
Inheritance Teststopped0.18stopped1.0stopped0.60
Indexing Teststopped0.16stopped0.76stopped0.46
Multithreading Teststopped0.62stoppedfailedstopped0.62
All Testsstopped0.29stopped0.93stopped0.58

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
 Hibernate
HSQLDB server
DataNucleus
H2 server
Hibernate
HSQLDB server
DataNucleus
H2 server
Hibernate
HSQLDB server
DataNucleus
H2 server
Basic Person Teststopped1.5stopped1.1stopped1.3
Element Collection Teststopped1.4stopped1.3stopped1.3
Inheritance Teststopped1.7stopped1.5stopped1.6
Indexing Teststopped4.0stopped1.4stopped2.7
Graph (Binary Tree) Teststopped0.92stopped0.62stopped0.77
Multithreading Teststoppedfailedstoppedfailedstoppedfailed
All Testsstopped1.9stopped1.2stopped1.5

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
 Hibernate
HSQLDB server
DataNucleus
H2 server
Hibernate
HSQLDB server
DataNucleus
H2 server
Hibernate
HSQLDB server
DataNucleus
H2 server
Basic Person Teststopped1.8stopped0.81stopped1.3
Element Collection Teststopped2.7stopped0.25stopped1.5
Inheritance Teststopped2.1stopped0.59stopped1.3
Indexing Teststopped3.4stopped0.57stopped2.0
Graph (Binary Tree) Teststopped8.0stopped12.1stopped10.1
Multithreading Teststoppedfailedstopped0.0000stopped0.0000
All Testsstopped3.6stopped2.4stopped2.9

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
 Hibernate
HSQLDB server
DataNucleus
H2 server
Hibernate
HSQLDB server
DataNucleus
H2 server
Hibernate
HSQLDB server
DataNucleus
H2 server
Basic Person Teststopped2.5stopped4.9stopped3.7
Element Collection Teststopped2.0stopped1.4stopped1.7
Inheritance Teststopped2.3stopped4.4stopped3.4
Indexing Teststopped3.5stopped5.3stopped4.4
Graph (Binary Tree) Teststopped3.4stopped5.2stopped4.3
Multithreading Teststopped2.8stopped1.7stopped2.3
All Testsstopped2.7stopped3.9stopped3.3

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