Comparison of Hibernate with Derby embedded vs Hibernate with HSQLDB embedded
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 Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | Hibernate Derby embedded | Hibernate HSQLDB embedded | Hibernate Derby embedded | Hibernate HSQLDB embedded | Hibernate Derby embedded | Hibernate HSQLDB embedded |
Basic Person Test | 5.9 | 32.6 | 3.8 | 13.1 | 4.9 | 22.9 |
Element Collection Test | 2.9 | 15.1 | 1.8 | 8.2 | 2.3 | 11.7 |
Inheritance Test | 5.3 | 25.5 | 3.7 | 13.6 | 4.5 | 19.5 |
Indexing Test | 7.0 | 29.6 | 4.8 | 18.8 | 5.9 | 24.2 |
Graph (Binary Tree) Test | 1.9 | 13.8 | 1.7 | 15.6 | 1.8 | 14.7 |
Multithreading Test | 10.5 | 37.4 | 3.7 | 13.0 | 7.1 | 25.2 |
All Tests | 5.6 | 25.6 | 3.3 | 13.7 | 4.4 | 19.7 |
The results above show that in general Hibernate with HSQLDB embedded is much more efficient than Hibernate with Derby embedded in persisting JPA entity objects to the database. Comparing the normalized speed of Hibernate with Derby embedded database (4.4) to the normalized speed of Hibernate with HSQLDB embedded database (19.7) reveals that in these tests, Hibernate with HSQLDB embedded is 4.5 times faster than Hibernate with Derby embedded.
A large performance gap has been detected when using graphs of objects with large transaction size. Comparing the normalized speed of Hibernate with Derby embedded database (1.7) to the normalized speed of Hibernate with HSQLDB embedded database (15.6) reveals that in that case, Hibernate with HSQLDB embedded is 9.2 times faster than Hibernate with Derby embedded.
Speed comparison of JPA database retrieval operations (normalized score, higher is better)
Retrieval Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | Hibernate Derby embedded | Hibernate HSQLDB embedded | Hibernate Derby embedded | Hibernate HSQLDB embedded | Hibernate Derby embedded | Hibernate HSQLDB embedded |
Basic Person Test | 14.2 | 24.8 | 16.4 | 16.4 | 15.3 | 20.6 |
Element Collection Test | 4.4 | 11.3 | 4.9 | 10.8 | 4.6 | 11.0 |
Inheritance Test | 10.3 | 21.7 | 18.6 | 21.0 | 14.4 | 21.3 |
Indexing Test | 10.0 | 11.9 | 16.4 | 21.5 | 13.2 | 16.7 |
Graph (Binary Tree) Test | 2.6 | 3.6 | 3.0 | 4.7 | 2.8 | 4.1 |
Multithreading Test | 19.3 | 19.8 | 19.3 | 21.5 | 19.3 | 20.6 |
All Tests | 10.1 | 15.5 | 13.1 | 16.0 | 11.6 | 15.7 |
The results above show that in general Hibernate with HSQLDB embedded is more efficient than Hibernate with Derby embedded in retrieving JPA entity objects from the database.
A large performance gap has been detected when using JPA element collections with small retrieval size. Comparing the normalized speed of Hibernate with Derby embedded database (4.4) to the normalized speed of Hibernate with HSQLDB embedded database (11.3) reveals that in that case, Hibernate with HSQLDB embedded is 2.6 times faster than Hibernate with Derby embedded.
Speed comparison of JPA database query operations (normalized score, higher is better)
Retrieval Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | Hibernate Derby embedded | Hibernate HSQLDB embedded | Hibernate Derby embedded | Hibernate HSQLDB embedded | Hibernate Derby embedded | Hibernate HSQLDB embedded |
Basic Person Test | 49.3 | 3.6 | 6.8 | 0.88 | 28.1 | 2.2 |
Element Collection Test | 37.6 | 3.4 | 2.7 | 1.7 | 20.1 | 2.6 |
Inheritance Test | 24.1 | 2.9 | 7.6 | 1.0 | 15.9 | 1.9 |
Indexing Test | 5.3 | 9.9 | 14.8 | 21.7 | 10.1 | 15.8 |
Multithreading Test | 39.7 | 1.1 | 6.1 | 0.58 | 22.9 | 0.82 |
All Tests | 31.2 | 4.2 | 7.6 | 5.2 | 19.4 | 4.7 |
The results above show that in general Hibernate with Derby embedded is much 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 Hibernate with Derby embedded database (19.4) reveals that in these tests, Hibernate with Derby embedded is 4.1 times faster than Hibernate with HSQLDB embedded.
A huge performance gap has been detected when using multithreading with small retrieval size. Comparing the normalized speed of Hibernate with HSQLDB embedded database (1.1) to the normalized speed of Hibernate with Derby embedded database (39.7) reveals that in that case, Hibernate with Derby embedded is 36.1 times faster than Hibernate with HSQLDB embedded.
Speed comparison of JPA database update operations (normalized score, higher is better)
Transaction Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | Hibernate Derby embedded | Hibernate HSQLDB embedded | Hibernate Derby embedded | Hibernate HSQLDB embedded | Hibernate Derby embedded | Hibernate HSQLDB embedded |
Basic Person Test | 4.5 | 14.2 | 3.2 | 5.0 | 3.8 | 9.6 |
Element Collection Test | 3.9 | 10.1 | 3.1 | 5.6 | 3.5 | 7.8 |
Inheritance Test | 4.6 | 13.4 | 4.5 | 7.5 | 4.5 | 10.5 |
Indexing Test | 4.6 | 10.7 | 5.5 | 6.1 | 5.1 | 8.4 |
Graph (Binary Tree) Test | 2.7 | 3.7 | 1.2 | 2.5 | 2.0 | 3.1 |
Multithreading Test | 11.6 | 23.9 | 2.6 | 3.8 | 7.1 | 13.9 |
All Tests | 5.3 | 12.7 | 3.3 | 5.1 | 4.3 | 8.9 |
The results above show that in general Hibernate with HSQLDB embedded is more efficient than Hibernate with Derby embedded in updating JPA entity objects in the database. Comparing the normalized speed of Hibernate with Derby embedded database (4.3) to the normalized speed of Hibernate with HSQLDB embedded database (8.9) reveals that in these tests, Hibernate with HSQLDB embedded is 2.1 times faster than Hibernate with Derby embedded.
A large performance gap has been detected when using simple basic entities with small transaction size. Comparing the normalized speed of Hibernate with Derby embedded database (4.5) to the normalized speed of Hibernate with HSQLDB embedded database (14.2) reveals that in that case, Hibernate with HSQLDB embedded is 3.2 times faster than Hibernate with Derby embedded.
Speed comparison of JPA database removal operations (normalized score, higher is better)
Transaction Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | Hibernate Derby embedded | Hibernate HSQLDB embedded | Hibernate Derby embedded | Hibernate HSQLDB embedded | Hibernate Derby embedded | Hibernate HSQLDB embedded |
Basic Person Test | 3.8 | 26.1 | 4.2 | 17.5 | 4.0 | 21.8 |
Element Collection Test | 2.3 | 9.1 | 1.5 | 5.2 | 1.9 | 7.1 |
Inheritance Test | 4.0 | 21.4 | 4.3 | 17.7 | 4.2 | 19.6 |
Indexing Test | 5.5 | 33.0 | 3.6 | 16.3 | 4.6 | 24.7 |
Graph (Binary Tree) Test | 0.74 | 5.4 | 0.96 | 8.2 | 0.85 | 6.8 |
Multithreading Test | 5.6 | 38.5 | 4.9 | 28.6 | 5.3 | 33.5 |
All Tests | 3.7 | 22.3 | 3.3 | 15.6 | 3.5 | 18.9 |
The results above show that in general Hibernate with HSQLDB embedded is much more efficient than Hibernate with Derby embedded in deleting JPA entity objects from the database. Comparing the normalized speed of Hibernate with Derby embedded database (3.5) to the normalized speed of Hibernate with HSQLDB embedded database (18.9) reveals that in these tests, Hibernate with HSQLDB embedded is 5.4 times faster than Hibernate with Derby embedded.
A large performance gap has been detected when using graphs of objects with large transaction size. Comparing the normalized speed of Hibernate with Derby embedded database (0.96) to the normalized speed of Hibernate with HSQLDB embedded database (8.2) reveals that in that case, Hibernate with HSQLDB embedded is 8.5 times faster than Hibernate with Derby embedded.
Comparison of database storage efficiency (normalized score, higher is better)
Transaction Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | Hibernate Derby embedded | Hibernate HSQLDB embedded | Hibernate Derby embedded | Hibernate HSQLDB embedded | Hibernate Derby embedded | Hibernate HSQLDB embedded |
Basic Person Test | 52.7 | 41.4 | 52.7 | 41.4 | 52.7 | 41.4 |
Element Collection Test | 42.3 | 46.9 | 42.3 | 46.9 | 42.3 | 46.9 |
Inheritance Test | 49.2 | 41.4 | 49.2 | 41.4 | 49.2 | 41.4 |
Indexing Test | 53.0 | 48.4 | 53.9 | 49.2 | 53.4 | 48.8 |
Graph (Binary Tree) Test | 13.1 | 28.5 | 9.8 | 21.4 | 11.5 | 25.0 |
Multithreading Test | 49.3 | 51.9 | 8.8 | 10.3 | 29.0 | 31.1 |
All Tests | 43.3 | 43.1 | 36.1 | 35.1 | 39.7 | 39.1 |
The results above show that in general Hibernate with Derby embedded is slightly more efficient than Hibernate with HSQLDB embedded in using disk space.
On the other hand, Hibernate with Derby embedded is slower, for instance, when using graphs of objects with large transaction size. Comparing the normalized score of Hibernate with Derby embedded database (9.8) to the normalized score of Hibernate with HSQLDB embedded database (21.4) reveals that in that case, Hibernate with Derby embedded is 2.2 times less efficient than Hibernate with HSQLDB embedded.
Comparison of JPA/Database speed - the averages (normalized score, higher is better)
Transaction/Retrieval Size | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | Hibernate Derby embedded | Hibernate HSQLDB embedded | Hibernate Derby embedded | Hibernate HSQLDB embedded | Hibernate Derby embedded | Hibernate HSQLDB embedded |
Basic Person Test | 15.5 | 20.2 | 6.9 | 10.6 | 11.2 | 15.4 |
Element Collection Test | 10.2 | 9.8 | 2.8 | 6.3 | 6.5 | 8.0 |
Inheritance Test | 9.7 | 17.0 | 7.7 | 12.2 | 8.7 | 14.6 |
Indexing Test | 6.5 | 19.0 | 9.0 | 16.9 | 7.8 | 18.0 |
Graph (Binary Tree) Test | 2.0 | 6.6 | 1.7 | 7.8 | 1.8 | 7.2 |
Multithreading Test | 17.3 | 24.1 | 7.3 | 13.5 | 12.3 | 18.8 |
All Tests | 10.5 | 16.5 | 6.1 | 11.3 | 8.3 | 13.9 |
The results above show that in general Hibernate with HSQLDB embedded is more efficient than Hibernate with Derby embedded in performing JPA database operations.
A large performance gap has been detected when using graphs of objects with large transaction/retrieval size. Comparing the normalized speed of Hibernate with Derby embedded database (1.7) to the normalized speed of Hibernate with HSQLDB embedded database (7.8) reveals that in that case, Hibernate with HSQLDB embedded is 4.6 times faster than Hibernate with Derby embedded.
Other Head to Head DBMS/JPA Comparisons
Hibernate with Derby embedded against:
- Oracle Database 11g
- IBM DB2 10
- Microsoft SQL Server 2008
- DataNucleus with Derby embedded
- DataNucleus with H2 embedded
- DataNucleus with HSQLDB embedded
- DataNucleus with DB4O embedded
- DataNucleus with Derby server
- DataNucleus with H2 server
- DataNucleus with MySQL server
- DataNucleus with PostgreSQL server
- EclipseLink with Derby embedded
- EclipseLink with H2 embedded
- EclipseLink with HSQLDB embedded
- EclipseLink with SQLite embedded
- EclipseLink with Derby server
- EclipseLink with H2 server
- EclipseLink with MySQL server
- EclipseLink with PostgreSQL server
- Hibernate with H2 embedded
- Hibernate with HSQLDB embedded
- Hibernate with SQLite embedded
- Hibernate with Derby server
- Hibernate with H2 server
- Hibernate with MySQL server
- Hibernate with PostgreSQL server
- OpenJPA with Derby embedded
- OpenJPA with H2 embedded
- OpenJPA with HSQLDB embedded
- OpenJPA with Derby server
- OpenJPA with H2 server
- OpenJPA with MySQL server
- OpenJPA with PostgreSQL server
- ObjectDB embedded
- ObjectDB server
Hibernate with HSQLDB embedded against:
- Oracle Database 11g
- IBM DB2 10
- Microsoft SQL Server 2008
- DataNucleus with Derby embedded
- DataNucleus with H2 embedded
- DataNucleus with HSQLDB embedded
- DataNucleus with DB4O embedded
- DataNucleus with Derby server
- DataNucleus with H2 server
- DataNucleus with MySQL server
- DataNucleus with PostgreSQL server
- EclipseLink with Derby embedded
- EclipseLink with H2 embedded
- EclipseLink with HSQLDB embedded
- EclipseLink with SQLite embedded
- EclipseLink with Derby server
- EclipseLink with H2 server
- EclipseLink with MySQL server
- EclipseLink with PostgreSQL server
- Hibernate with Derby embedded
- Hibernate with H2 embedded
- Hibernate with SQLite embedded
- Hibernate with Derby server
- Hibernate with H2 server
- Hibernate with MySQL server
- Hibernate with PostgreSQL server
- OpenJPA with Derby embedded
- OpenJPA with H2 embedded
- OpenJPA with HSQLDB embedded
- OpenJPA with Derby server
- OpenJPA with H2 server
- OpenJPA with MySQL server
- OpenJPA with PostgreSQL server
- ObjectDB embedded
- ObjectDB server