Compare with

Comparison of Hibernate with HSQLDB embedded vs DataNucleus with Derby 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 embedded
DataNucleus
Derby server
Hibernate
HSQLDB embedded
DataNucleus
Derby server
Hibernate
HSQLDB embedded
DataNucleus
Derby server
Basic Person Test32.62.813.12.322.92.6
Element Collection Test15.10.718.20.3511.70.53
Inheritance Test25.52.713.62.019.52.3
Indexing Test29.64.518.84.024.24.3
Graph (Binary Tree) Test13.80.6215.60.5314.70.57
Multithreading Test37.44.913.03.425.24.1
All Tests25.62.713.72.119.72.4

The results above show that in general Hibernate with HSQLDB embedded is much more efficient than DataNucleus with Derby server in persisting JPA entity objects to the database. Comparing the normalized speed of DataNucleus with Derby database server (2.4) to the normalized speed of Hibernate with HSQLDB embedded database (19.7) reveals that in these tests, Hibernate with HSQLDB embedded is 8.2 times faster than DataNucleus with Derby server.

A huge performance gap has been detected when using graphs of objects with large transaction size. Comparing the normalized speed of DataNucleus with Derby database server (0.53) to the normalized speed of Hibernate with HSQLDB embedded database (15.6) reveals that in that case, Hibernate with HSQLDB embedded is 29.4 times faster than DataNucleus with Derby server.

Speed comparison of JPA database retrieval operations (normalized score, higher is better)

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
HSQLDB embedded
DataNucleus
Derby server
Hibernate
HSQLDB embedded
DataNucleus
Derby server
Hibernate
HSQLDB embedded
DataNucleus
Derby server
Basic Person Test24.80.5616.46.320.63.4
Element Collection Test11.30.3610.80.9311.00.64
Inheritance Test21.70.4521.06.821.33.6
Indexing Test11.90.5021.57.116.73.8
Graph (Binary Tree) Test3.60.224.76.64.13.4
Multithreading Test19.81.221.510.020.65.6
All Tests15.50.5516.06.315.73.4

The results above show that in general Hibernate with HSQLDB embedded is much more efficient than DataNucleus with Derby server in retrieving JPA entity objects from the database. Comparing the normalized speed of DataNucleus with Derby database server (3.4) to the normalized speed of Hibernate with HSQLDB embedded database (15.7) reveals that in these tests, Hibernate with HSQLDB embedded is 4.6 times faster than DataNucleus with Derby server.

A huge performance gap has been detected when using class inheritance in the object model with small retrieval size. Comparing the normalized speed of DataNucleus with Derby database server (0.45) to the normalized speed of Hibernate with HSQLDB embedded database (21.7) reveals that in that case, Hibernate with HSQLDB embedded is 48.2 times faster than DataNucleus with Derby server.

Speed comparison of JPA database query operations (normalized score, higher is better)

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
HSQLDB embedded
DataNucleus
Derby server
Hibernate
HSQLDB embedded
DataNucleus
Derby server
Hibernate
HSQLDB embedded
DataNucleus
Derby server
Basic Person Test3.637.70.883.62.220.7
Element Collection Test3.425.91.71.42.613.6
Inheritance Test2.96.51.01.81.94.2
Indexing Test9.90.03021.74.915.82.5
Multithreading Test1.1failed0.58failed0.82failed
All Tests4.217.55.22.94.710.2

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

The results above show that in general DataNucleus with Derby server is more efficient than Hibernate with HSQLDB embedded in executing the tested JPA queries. Comparing the normalized speed of Hibernate with HSQLDB embedded database (4.7) to the normalized speed of DataNucleus with Derby database server (10.2) reveals that in these tests, DataNucleus with Derby server is 2.2 times faster than Hibernate with HSQLDB embedded.

A huge performance gap has been detected when using simple basic entities with small retrieval size. Comparing the normalized speed of Hibernate with HSQLDB embedded database (3.6) to the normalized speed of DataNucleus with Derby database server (37.7) reveals that in that case, DataNucleus with Derby server is 10.5 times faster than Hibernate with HSQLDB embedded.

On the other hand, DataNucleus with Derby server is slower, for instance, when using database indexes with small retrieval size. Comparing the normalized speed of DataNucleus with Derby database server (0.030) to the normalized speed of Hibernate with HSQLDB embedded database (9.9) reveals that in that case, DataNucleus with Derby server is 330 times slower than Hibernate with HSQLDB embedded.

Speed comparison of JPA database update operations (normalized score, higher is better)

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
HSQLDB embedded
DataNucleus
Derby server
Hibernate
HSQLDB embedded
DataNucleus
Derby server
Hibernate
HSQLDB embedded
DataNucleus
Derby server
Basic Person Test14.21.15.00.859.60.99
Element Collection Test10.10.815.60.627.80.71
Inheritance Test13.41.27.51.310.51.2
Indexing Test10.71.26.11.58.41.3
Graph (Binary Tree) Test3.70.292.50.413.10.35
Multithreading Test23.9failed3.8failed13.9failed
All Tests12.70.935.10.928.90.92

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

The results above show that in general Hibernate with HSQLDB embedded is much more efficient than DataNucleus with Derby server in updating JPA entity objects in the database. Comparing the normalized speed of DataNucleus with Derby database server (0.92) to the normalized speed of Hibernate with HSQLDB embedded database (8.9) reveals that in these tests, Hibernate with HSQLDB embedded is 9.7 times faster than DataNucleus with Derby server.

A huge performance gap has been detected when using simple basic entities with small transaction size. Comparing the normalized speed of DataNucleus with Derby database server (1.1) to the normalized speed of Hibernate with HSQLDB embedded database (14.2) reveals that in that case, Hibernate with HSQLDB embedded is 12.9 times faster than DataNucleus with Derby server.

Speed comparison of JPA database removal operations (normalized score, higher is better)

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
HSQLDB embedded
DataNucleus
Derby server
Hibernate
HSQLDB embedded
DataNucleus
Derby server
Hibernate
HSQLDB embedded
DataNucleus
Derby server
Basic Person Test26.11.317.51.321.81.3
Element Collection Test9.10.615.20.337.10.47
Inheritance Test21.41.017.71.319.61.2
Indexing Test33.02.316.31.924.72.1
Graph (Binary Tree) Test5.40.268.20.466.80.36
Multithreading Test38.5failed28.6failed33.5failed
All Tests22.31.115.61.118.91.1

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

The results above show that in general Hibernate with HSQLDB embedded is much more efficient than DataNucleus with Derby server in deleting JPA entity objects from the database. Comparing the normalized speed of DataNucleus with Derby database server (1.1) to the normalized speed of Hibernate with HSQLDB embedded database (18.9) reveals that in these tests, Hibernate with HSQLDB embedded is 17.2 times faster than DataNucleus with Derby server.

A huge performance gap has been detected when using class inheritance in the object model with small transaction size. Comparing the normalized speed of DataNucleus with Derby database server (1.0) to the normalized speed of Hibernate with HSQLDB embedded database (21.4) reveals that in that case, Hibernate with HSQLDB embedded is 21.4 times faster than DataNucleus with Derby server.

Comparison of JPA/Database speed - the averages (normalized score, higher is better)

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 Hibernate
HSQLDB embedded
DataNucleus
Derby server
Hibernate
HSQLDB embedded
DataNucleus
Derby server
Hibernate
HSQLDB embedded
DataNucleus
Derby server
Basic Person Test20.28.710.62.915.45.8
Element Collection Test9.85.76.30.728.03.2
Inheritance Test17.02.412.22.614.62.5
Indexing Test19.01.716.93.918.02.8
Graph (Binary Tree) Test6.60.357.82.07.21.2
Multithreading Test24.13.013.56.718.84.9
All Tests16.53.811.32.813.93.3

The results above show that in general Hibernate with HSQLDB embedded is much more efficient than DataNucleus with Derby server in performing JPA database operations. Comparing the normalized speed of DataNucleus with Derby database server (3.3) to the normalized speed of Hibernate with HSQLDB embedded database (13.9) reveals that in these tests, Hibernate with HSQLDB embedded is 4.2 times faster than DataNucleus with Derby server.

A huge performance gap has been detected when using graphs of objects with small transaction/retrieval size. Comparing the normalized speed of DataNucleus with Derby database server (0.35) to the normalized speed of Hibernate with HSQLDB embedded database (6.6) reveals that in that case, Hibernate with HSQLDB embedded is 18.9 times faster than DataNucleus with Derby server.

Other Head to Head DBMS/JPA Comparisons