Compare with

Comparison of Hibernate with Derby embedded vs Hibernate 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
Derby embedded
Hibernate
Derby server
Hibernate
Derby embedded
Hibernate
Derby server
Hibernate
Derby embedded
Hibernate
Derby server
Basic Person Test5.93.83.83.04.93.4
Element Collection Test2.92.01.81.32.31.7
Inheritance Test5.33.43.73.04.53.2
Indexing Test7.04.84.84.15.94.4
Graph (Binary Tree) Test1.91.81.71.61.81.7
Multithreading Test10.56.93.73.97.15.4
All Tests5.63.83.32.84.43.3

The results above show that in general Hibernate with Derby embedded is more efficient than Hibernate with Derby server in persisting JPA entity objects to the database.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
Derby embedded
Hibernate
Derby server
Hibernate
Derby embedded
Hibernate
Derby server
Hibernate
Derby embedded
Hibernate
Derby server
Basic Person Test14.23.816.48.415.36.1
Element Collection Test4.41.04.91.04.61.0
Inheritance Test10.33.518.69.714.46.6
Indexing Test10.03.216.49.513.26.4
Graph (Binary Tree) Test2.60.913.01.22.81.1
Multithreading Test19.37.819.313.419.310.6
All Tests10.13.413.17.211.65.3

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

A large performance gap has been detected when using JPA element collections with large retrieval size. Comparing the normalized speed of Hibernate with Derby database server (1.0) to the normalized speed of Hibernate with Derby embedded database (4.9) reveals that in that case, Hibernate with Derby embedded is 4.9 times faster than Hibernate with Derby server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
Derby embedded
Hibernate
Derby server
Hibernate
Derby embedded
Hibernate
Derby server
Hibernate
Derby embedded
Hibernate
Derby server
Basic Person Test49.334.06.84.128.119.1
Element Collection Test37.633.82.70.6420.117.2
Inheritance Test24.120.57.65.015.912.8
Indexing Test5.32.014.89.210.15.6
Multithreading Test39.736.26.15.122.920.6
All Tests31.225.37.64.819.415.1

The results above show that in general Hibernate with Derby embedded is slightly more efficient than Hibernate with Derby server in executing the tested JPA queries.

A large performance gap has been detected when using JPA element collections with large retrieval size. Comparing the normalized speed of Hibernate with Derby database server (0.64) to the normalized speed of Hibernate with Derby embedded database (2.7) reveals that in that case, Hibernate with Derby embedded is 4.2 times faster than Hibernate with Derby server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
Derby embedded
Hibernate
Derby server
Hibernate
Derby embedded
Hibernate
Derby server
Hibernate
Derby embedded
Hibernate
Derby server
Basic Person Test4.52.93.22.53.82.7
Element Collection Test3.92.33.11.53.51.9
Inheritance Test4.62.94.53.54.53.2
Indexing Test4.63.05.54.25.13.6
Graph (Binary Tree) Test2.71.21.20.582.00.91
Multithreading Test11.66.82.62.57.14.6
All Tests5.33.23.32.54.32.8

The results above show that in general Hibernate with Derby embedded is more efficient than Hibernate with Derby server in updating JPA entity objects in the database.

A large performance gap has been detected when using graphs of objects with small transaction size. Comparing the normalized speed of Hibernate with Derby database server (1.2) to the normalized speed of Hibernate with Derby embedded database (2.7) reveals that in that case, Hibernate with Derby embedded is 2.3 times faster than Hibernate with Derby server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
Derby embedded
Hibernate
Derby server
Hibernate
Derby embedded
Hibernate
Derby server
Hibernate
Derby embedded
Hibernate
Derby server
Basic Person Test3.82.94.23.54.03.2
Element Collection Test2.31.71.50.871.91.3
Inheritance Test4.02.94.33.64.23.2
Indexing Test5.53.73.63.64.63.7
Graph (Binary Tree) Test0.740.690.960.700.850.70
Multithreading Test5.66.24.95.15.35.6
All Tests3.73.03.32.93.53.0

The results above show that in general Hibernate with Derby embedded is slightly more efficient than Hibernate with Derby server in deleting JPA entity objects from the database.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 Hibernate
Derby embedded
Hibernate
Derby server
Hibernate
Derby embedded
Hibernate
Derby server
Hibernate
Derby embedded
Hibernate
Derby server
Basic Person Test15.59.56.94.311.26.9
Element Collection Test10.28.22.81.16.54.6
Inheritance Test9.76.67.75.08.75.8
Indexing Test6.53.39.06.17.84.7
Graph (Binary Tree) Test2.01.21.71.01.81.1
Multithreading Test17.312.87.36.012.39.4
All Tests10.57.16.14.08.35.6

The results above show that in general Hibernate with Derby embedded is more efficient than Hibernate with Derby server in performing JPA database operations.

A large performance gap has been detected when using JPA element collections with large transaction/retrieval size. Comparing the normalized speed of Hibernate with Derby database server (1.1) to the normalized speed of Hibernate with Derby embedded database (2.8) reveals that in that case, Hibernate with Derby embedded is 2.5 times faster than Hibernate with Derby server.

Other Head to Head DBMS/JPA Comparisons