Compare with

Comparison of Hibernate with HSQLDB server vs DataNucleus with PostgreSQL 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
PostgreSQL server
Hibernate
HSQLDB server
DataNucleus
PostgreSQL server
Hibernate
HSQLDB server
DataNucleus
PostgreSQL server
Basic Person Teststopped8.8stopped10.8stopped9.8
Element Collection Teststopped3.5stopped3.4stopped3.4
Inheritance Teststopped4.6stopped11.2stopped7.9
Indexing Teststopped8.7stopped12.1stopped10.4
Graph (Binary Tree) Teststopped2.7stopped3.1stopped2.9
Multithreading Teststopped7.4stopped0.0000stopped3.7
All Testsstopped5.9stopped6.8stopped6.3

The results above show that in general DataNucleus with PostgreSQL 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 PostgreSQL database server (6.3) reveals that in these tests, DataNucleus with PostgreSQL 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
PostgreSQL server
Hibernate
HSQLDB server
DataNucleus
PostgreSQL server
Hibernate
HSQLDB server
DataNucleus
PostgreSQL server
Basic Person Teststopped1.1stopped4.3stopped2.7
Element Collection Teststopped0.57stopped3.4stopped2.0
Inheritance Teststopped0.68stopped5.7stopped3.2
Indexing Teststopped0.62stopped4.7stopped2.7
Graph (Binary Tree) Teststopped1.3stopped4.2stopped2.7
Multithreading Teststopped1.1stopped6.1stopped3.6
All Testsstopped0.90stopped4.7stopped2.8

The results above show that in general DataNucleus with PostgreSQL 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 PostgreSQL database server (2.8) reveals that in these tests, DataNucleus with PostgreSQL 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
PostgreSQL server
Hibernate
HSQLDB server
DataNucleus
PostgreSQL server
Hibernate
HSQLDB server
DataNucleus
PostgreSQL server
Basic Person Teststopped0.21stopped1.1stopped0.67
Element Collection Teststopped0.41stopped1.4stopped0.88
Inheritance Teststopped0.16stopped1.3stopped0.74
Indexing Teststopped0.15stopped1.0stopped0.60
Multithreading Teststoppedfailedstoppedfailedstoppedfailed
All Testsstopped0.24stopped1.2stopped0.72

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

The results above show that in general DataNucleus with PostgreSQL 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 PostgreSQL database server (0.72) reveals that in these tests, DataNucleus with PostgreSQL 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
PostgreSQL server
Hibernate
HSQLDB server
DataNucleus
PostgreSQL server
Hibernate
HSQLDB server
DataNucleus
PostgreSQL server
Basic Person Teststopped0.81stopped0.72stopped0.77
Element Collection Teststopped1.6stopped0.73stopped1.1
Inheritance Teststopped0.98stopped0.92stopped0.95
Indexing Teststopped2.5stopped1.0stopped1.8
Graph (Binary Tree) Teststopped0.50stopped0.31stopped0.40
Multithreading Teststopped0.079stoppedfailedstopped0.079
All Testsstopped1.1stopped0.74stopped0.92

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

The results above show that in general DataNucleus with PostgreSQL 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 PostgreSQL database server (0.92) reveals that in these tests, DataNucleus with PostgreSQL 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
PostgreSQL server
Hibernate
HSQLDB server
DataNucleus
PostgreSQL server
Hibernate
HSQLDB server
DataNucleus
PostgreSQL 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) Teststopped3.4stopped4.8stopped4.1
Multithreading Teststoppedfailedstopped0.0000stopped0.0000
All Testsstopped2.7stopped1.2stopped1.8

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

The results above show that in general DataNucleus with PostgreSQL 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 PostgreSQL database server (1.8) reveals that in these tests, DataNucleus with PostgreSQL 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
PostgreSQL server
Hibernate
HSQLDB server
DataNucleus
PostgreSQL server
Hibernate
HSQLDB server
DataNucleus
PostgreSQL server
Basic Person Teststopped2.5stopped3.5stopped3.0
Element Collection Teststopped1.7stopped1.8stopped1.8
Inheritance Teststopped1.7stopped4.0stopped2.8
Indexing Teststopped3.1stopped3.9stopped3.5
Graph (Binary Tree) Teststopped2.0stopped3.1stopped2.5
Multithreading Teststopped2.9stopped2.0stopped2.4
All Testsstopped2.3stopped3.1stopped2.7

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

Other Head to Head DBMS/JPA Comparisons