Compare with

Comparison of DataNucleus with PostgreSQL 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
PostgreSQL server
Hibernate
HSQLDB server
DataNucleus
PostgreSQL server
Hibernate
HSQLDB server
DataNucleus
PostgreSQL server
Hibernate
HSQLDB server
Basic Person Test8.8stopped10.8stopped9.8stopped
Element Collection Test3.5stopped3.4stopped3.4stopped
Inheritance Test4.6stopped11.2stopped7.9stopped
Indexing Test8.7stopped12.1stopped10.4stopped
Graph (Binary Tree) Test2.7stopped3.1stopped2.9stopped
Multithreading Test7.4stopped0.0000stopped3.7stopped
All Tests5.9stopped6.8stopped6.3stopped

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
 DataNucleus
PostgreSQL server
Hibernate
HSQLDB server
DataNucleus
PostgreSQL server
Hibernate
HSQLDB server
DataNucleus
PostgreSQL server
Hibernate
HSQLDB server
Basic Person Test1.1stopped4.3stopped2.7stopped
Element Collection Test0.57stopped3.4stopped2.0stopped
Inheritance Test0.68stopped5.7stopped3.2stopped
Indexing Test0.62stopped4.7stopped2.7stopped
Graph (Binary Tree) Test1.3stopped4.2stopped2.7stopped
Multithreading Test1.1stopped6.1stopped3.6stopped
All Tests0.90stopped4.7stopped2.8stopped

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
 DataNucleus
PostgreSQL server
Hibernate
HSQLDB server
DataNucleus
PostgreSQL server
Hibernate
HSQLDB server
DataNucleus
PostgreSQL server
Hibernate
HSQLDB server
Basic Person Test0.21stopped1.1stopped0.67stopped
Element Collection Test0.41stopped1.4stopped0.88stopped
Inheritance Test0.16stopped1.3stopped0.74stopped
Indexing Test0.15stopped1.0stopped0.60stopped
Multithreading Testfailedstoppedfailedstoppedfailedstopped
All Tests0.24stopped1.2stopped0.72stopped

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
 DataNucleus
PostgreSQL server
Hibernate
HSQLDB server
DataNucleus
PostgreSQL server
Hibernate
HSQLDB server
DataNucleus
PostgreSQL server
Hibernate
HSQLDB server
Basic Person Test0.81stopped0.72stopped0.77stopped
Element Collection Test1.6stopped0.73stopped1.1stopped
Inheritance Test0.98stopped0.92stopped0.95stopped
Indexing Test2.5stopped1.0stopped1.8stopped
Graph (Binary Tree) Test0.50stopped0.31stopped0.40stopped
Multithreading Test0.079stoppedfailedstopped0.079stopped
All Tests1.1stopped0.74stopped0.92stopped

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
 DataNucleus
PostgreSQL server
Hibernate
HSQLDB server
DataNucleus
PostgreSQL server
Hibernate
HSQLDB server
DataNucleus
PostgreSQL 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) Test3.4stopped4.8stopped4.1stopped
Multithreading Testfailedstopped0.0000stopped0.0000stopped
All Tests2.7stopped1.2stopped1.8stopped

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
 DataNucleus
PostgreSQL server
Hibernate
HSQLDB server
DataNucleus
PostgreSQL server
Hibernate
HSQLDB server
DataNucleus
PostgreSQL server
Hibernate
HSQLDB server
Basic Person Test2.5stopped3.5stopped3.0stopped
Element Collection Test1.7stopped1.8stopped1.8stopped
Inheritance Test1.7stopped4.0stopped2.8stopped
Indexing Test3.1stopped3.9stopped3.5stopped
Graph (Binary Tree) Test2.0stopped3.1stopped2.5stopped
Multithreading Test2.9stopped2.0stopped2.4stopped
All Tests2.3stopped3.1stopped2.7stopped

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