Comparison of OpenJPA with HSQLDB embedded vs Hibernate with SQLite 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 | |||
---|---|---|---|---|---|---|
  | OpenJPA HSQLDB embedded | Hibernate SQLite embedded | OpenJPA HSQLDB embedded | Hibernate SQLite embedded | OpenJPA HSQLDB embedded | Hibernate SQLite embedded |
Basic Person Test | 13.3 | 0.083 | 6.9 | 1.0 | 10.1 | 0.55 |
Element Collection Test | 8.6 | 0.067 | 5.3 | 0.69 | 7.0 | 0.38 |
Inheritance Test | 12.2 | 0.080 | 5.8 | 0.99 | 9.0 | 0.54 |
Indexing Test | 16.7 | 0.098 | 9.1 | 1.0 | 12.9 | 0.55 |
Graph (Binary Tree) Test | 6.1 | 0.27 | 7.3 | 0.96 | 6.7 | 0.61 |
Multithreading Test | 26.8 | failed | 7.0 | failed | 16.9 | failed |
All Tests | 13.9 | 0.12 | 6.9 | 0.93 | 10.4 | 0.53 |
Hibernate with SQLite embedded has failed in 2 tests (see exceptions).
The results above show that in general OpenJPA with HSQLDB embedded is much more efficient than Hibernate with SQLite embedded in persisting JPA entity objects to the database. Comparing the normalized speed of Hibernate with SQLite embedded database (0.53) to the normalized speed of OpenJPA with HSQLDB embedded database (10.4) reveals that in these tests, OpenJPA with HSQLDB embedded is 19.6 times faster than Hibernate with SQLite embedded.
A huge performance gap has been detected when using database indexes with small transaction size. Comparing the normalized speed of Hibernate with SQLite embedded database (0.098) to the normalized speed of OpenJPA with HSQLDB embedded database (16.7) reveals that in that case, OpenJPA with HSQLDB embedded is 170 times faster than Hibernate with SQLite embedded.
Speed comparison of JPA database retrieval operations (normalized score, higher is better)
Retrieval Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | OpenJPA HSQLDB embedded | Hibernate SQLite embedded | OpenJPA HSQLDB embedded | Hibernate SQLite embedded | OpenJPA HSQLDB embedded | Hibernate SQLite embedded |
Basic Person Test | 21.8 | 1.8 | 30.1 | 1.3 | 25.9 | 1.5 |
Element Collection Test | 0.0068 | 0.0008 | 4.5 | failed | 2.2 | 0.0008 |
Inheritance Test | 0.0025 | 2.4 | 2.0 | 1.4 | 0.98 | 1.9 |
Indexing Test | 22.1 | 1.9 | 43.6 | 2.3 | 32.9 | 2.1 |
Graph (Binary Tree) Test | 2.1 | 0.56 | 2.1 | 0.88 | 2.1 | 0.72 |
Multithreading Test | 20.9 | failed | 23.5 | failed | 22.2 | failed |
All Tests | 11.1 | 1.3 | 17.6 | 1.5 | 14.4 | 1.4 |
Hibernate with SQLite embedded has failed in 3 tests (see exceptions).
The results above show that in general OpenJPA with HSQLDB embedded is much more efficient than Hibernate with SQLite embedded in retrieving JPA entity objects from the database. Comparing the normalized speed of Hibernate with SQLite embedded database (1.4) to the normalized speed of OpenJPA with HSQLDB embedded database (14.4) reveals that in these tests, OpenJPA with HSQLDB embedded is 10.3 times faster than Hibernate with SQLite embedded.
A huge performance gap has been detected when using simple basic entities with large retrieval size. Comparing the normalized speed of Hibernate with SQLite embedded database (1.3) to the normalized speed of OpenJPA with HSQLDB embedded database (30.1) reveals that in that case, OpenJPA with HSQLDB embedded is 23.2 times faster than Hibernate with SQLite embedded.
On the other hand, OpenJPA with HSQLDB embedded is slower, for instance, when using class inheritance in the object model with small retrieval size. Comparing the normalized speed of OpenJPA with HSQLDB embedded database (0.0025) to the normalized speed of Hibernate with SQLite embedded database (2.4) reveals that in that case, OpenJPA with HSQLDB embedded is 960 times slower than Hibernate with SQLite embedded.
Speed comparison of JPA database query operations (normalized score, higher is better)
Retrieval Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | OpenJPA HSQLDB embedded | Hibernate SQLite embedded | OpenJPA HSQLDB embedded | Hibernate SQLite embedded | OpenJPA HSQLDB embedded | Hibernate SQLite embedded |
Basic Person Test | 2.8 | 1.1 | 0.91 | 0.22 | 1.9 | 0.65 |
Element Collection Test | 1.4 | 0.39 | 0.95 | failed | 1.2 | 0.39 |
Inheritance Test | 2.4 | 0.53 | 1.3 | 0.28 | 1.8 | 0.40 |
Indexing Test | 15.4 | 0.0011 | 34.3 | 0.43 | 24.9 | 0.21 |
Multithreading Test | 1.4 | failed | 0.53 | failed | 0.95 | failed |
All Tests | 4.7 | 0.50 | 7.6 | 0.31 | 6.1 | 0.42 |
Hibernate with SQLite embedded has failed in 3 tests (see exceptions).
The results above show that in general OpenJPA with HSQLDB embedded is much more efficient than Hibernate with SQLite embedded in executing the tested JPA queries. Comparing the normalized speed of Hibernate with SQLite embedded database (0.42) to the normalized speed of OpenJPA with HSQLDB embedded database (6.1) reveals that in these tests, OpenJPA with HSQLDB embedded is 14.5 times faster than Hibernate with SQLite embedded.
A huge performance gap has been detected when using database indexes with small retrieval size. Comparing the normalized speed of Hibernate with SQLite embedded database (0.0011) to the normalized speed of OpenJPA with HSQLDB embedded database (15.4) reveals that in that case, OpenJPA with HSQLDB embedded is 14,000 times faster than Hibernate with SQLite embedded.
Speed comparison of JPA database update operations (normalized score, higher is better)
Transaction Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | OpenJPA HSQLDB embedded | Hibernate SQLite embedded | OpenJPA HSQLDB embedded | Hibernate SQLite embedded | OpenJPA HSQLDB embedded | Hibernate SQLite embedded |
Basic Person Test | 12.0 | 0.076 | 5.3 | 0.65 | 8.6 | 0.37 |
Element Collection Test | 0.017 | 0.0022 | 3.7 | failed | 1.8 | 0.0022 |
Inheritance Test | 0.0098 | 0.079 | 2.0 | 0.97 | 0.99 | 0.53 |
Indexing Test | 9.3 | 0.057 | 5.5 | 0.54 | 7.4 | 0.30 |
Graph (Binary Tree) Test | 2.5 | 0.26 | 1.6 | 0.42 | 2.1 | 0.34 |
Multithreading Test | 20.0 | failed | 3.7 | failed | 11.8 | failed |
All Tests | 7.3 | 0.094 | 3.6 | 0.65 | 5.5 | 0.34 |
Hibernate with SQLite embedded has failed in 3 tests (see exceptions).
The results above show that in general OpenJPA with HSQLDB embedded is much more efficient than Hibernate with SQLite embedded in updating JPA entity objects in the database. Comparing the normalized speed of Hibernate with SQLite embedded database (0.34) to the normalized speed of OpenJPA with HSQLDB embedded database (5.5) reveals that in these tests, OpenJPA with HSQLDB embedded is 16.2 times faster than Hibernate with SQLite embedded.
A huge performance gap has been detected when using database indexes with small transaction size. Comparing the normalized speed of Hibernate with SQLite embedded database (0.057) to the normalized speed of OpenJPA with HSQLDB embedded database (9.3) reveals that in that case, OpenJPA with HSQLDB embedded is 163 times faster than Hibernate with SQLite embedded.
On the other hand, OpenJPA with HSQLDB embedded is slower, for instance, when using class inheritance in the object model with small transaction size. Comparing the normalized speed of OpenJPA with HSQLDB embedded database (0.0098) to the normalized speed of Hibernate with SQLite embedded database (0.079) reveals that in that case, OpenJPA with HSQLDB embedded is 8.1 times slower than Hibernate with SQLite embedded.
Speed comparison of JPA database removal operations (normalized score, higher is better)
Transaction Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | OpenJPA HSQLDB embedded | Hibernate SQLite embedded | OpenJPA HSQLDB embedded | Hibernate SQLite embedded | OpenJPA HSQLDB embedded | Hibernate SQLite embedded |
Basic Person Test | 21.3 | 0.061 | 15.7 | 0.91 | 18.5 | 0.49 |
Element Collection Test | 0.011 | 0.0007 | 2.9 | failed | 1.5 | 0.0007 |
Inheritance Test | 0.0070 | 0.058 | 3.5 | 0.90 | 1.8 | 0.48 |
Indexing Test | 28.8 | 0.079 | 15.2 | 0.54 | 22.0 | 0.31 |
Graph (Binary Tree) Test | 2.9 | 0.24 | 3.6 | 0.80 | 3.2 | 0.52 |
Multithreading Test | 26.0 | failed | 19.6 | failed | 22.8 | failed |
All Tests | 13.2 | 0.088 | 10.1 | 0.79 | 11.6 | 0.40 |
Hibernate with SQLite embedded has failed in 3 tests (see exceptions).
The results above show that in general OpenJPA with HSQLDB embedded is much more efficient than Hibernate with SQLite embedded in deleting JPA entity objects from the database. Comparing the normalized speed of Hibernate with SQLite embedded database (0.40) to the normalized speed of OpenJPA with HSQLDB embedded database (11.6) reveals that in these tests, OpenJPA with HSQLDB embedded is 29.0 times faster than Hibernate with SQLite embedded.
A huge performance gap has been detected when using database indexes with small transaction size. Comparing the normalized speed of Hibernate with SQLite embedded database (0.079) to the normalized speed of OpenJPA with HSQLDB embedded database (28.8) reveals that in that case, OpenJPA with HSQLDB embedded is 365 times faster than Hibernate with SQLite embedded.
On the other hand, OpenJPA with HSQLDB embedded is slower, for instance, when using class inheritance in the object model with small transaction size. Comparing the normalized speed of OpenJPA with HSQLDB embedded database (0.0070) to the normalized speed of Hibernate with SQLite embedded database (0.058) reveals that in that case, OpenJPA with HSQLDB embedded is 8.3 times slower than Hibernate with SQLite embedded.
Comparison of database storage efficiency (normalized score, higher is better)
Transaction Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | OpenJPA HSQLDB embedded | Hibernate SQLite embedded | OpenJPA HSQLDB embedded | Hibernate SQLite embedded | OpenJPA HSQLDB embedded | Hibernate SQLite embedded |
Basic Person Test | 41.4 | 90.2 | 41.4 | 90.2 | 41.4 | 90.2 |
Element Collection Test | 46.9 | 82.0 | 46.9 | 82.0 | 46.9 | 82.0 |
Inheritance Test | 41.4 | 80.5 | 41.4 | 80.5 | 41.4 | 80.5 |
Indexing Test | 48.4 | 93.4 | 49.2 | 94.8 | 48.8 | 94.1 |
Graph (Binary Tree) Test | 28.5 | 67.9 | 21.4 | 50.9 | 25.0 | 59.4 |
Multithreading Test | 51.9 | failed | 10.3 | failed | 31.1 | failed |
All Tests | 43.1 | 82.8 | 35.1 | 79.7 | 39.1 | 81.2 |
Hibernate with SQLite embedded has failed in 2 tests (see exceptions).
The results above show that in general Hibernate with SQLite embedded is more efficient than OpenJPA with HSQLDB embedded in using disk space. Comparing the normalized score of OpenJPA with HSQLDB embedded database (39.1) to the normalized score of Hibernate with SQLite embedded database (81.2) reveals that in these tests, Hibernate with SQLite embedded is 2.1 times more efficient than OpenJPA with HSQLDB embedded.
A large gap has been detected when using graphs of objects with small transaction size. Comparing the normalized score of OpenJPA with HSQLDB embedded database (28.5) to the normalized score of Hibernate with SQLite embedded database (67.9) reveals that in that case, Hibernate with SQLite embedded is 2.4 times more efficient than OpenJPA with HSQLDB embedded.
Comparison of JPA/Database speed - the averages (normalized score, higher is better)
Transaction/Retrieval Size | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | OpenJPA HSQLDB embedded | Hibernate SQLite embedded | OpenJPA HSQLDB embedded | Hibernate SQLite embedded | OpenJPA HSQLDB embedded | Hibernate SQLite embedded |
Basic Person Test | 14.3 | 0.63 | 11.8 | 0.81 | 13.0 | 0.72 |
Element Collection Test | 2.0 | 0.092 | 3.5 | 0.69 | 2.7 | 0.19 |
Inheritance Test | 2.9 | 0.63 | 2.9 | 0.91 | 2.9 | 0.77 |
Indexing Test | 18.5 | 0.42 | 21.6 | 0.96 | 20.0 | 0.69 |
Graph (Binary Tree) Test | 3.4 | 0.33 | 3.7 | 0.77 | 3.5 | 0.55 |
Multithreading Test | 19.0 | failed | 10.9 | failed | 14.9 | failed |
All Tests | 10.2 | 0.42 | 9.2 | 0.86 | 9.7 | 0.62 |
The results above show that in general OpenJPA with HSQLDB embedded is much more efficient than Hibernate with SQLite embedded in performing JPA database operations. Comparing the normalized speed of Hibernate with SQLite embedded database (0.62) to the normalized speed of OpenJPA with HSQLDB embedded database (9.7) reveals that in these tests, OpenJPA with HSQLDB embedded is 15.6 times faster than Hibernate with SQLite embedded.
A huge performance gap has been detected when using database indexes with small transaction/retrieval size. Comparing the normalized speed of Hibernate with SQLite embedded database (0.42) to the normalized speed of OpenJPA with HSQLDB embedded database (18.5) reveals that in that case, OpenJPA with HSQLDB embedded is 44.0 times faster than Hibernate with SQLite embedded.
Other Head to Head DBMS/JPA Comparisons
OpenJPA 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 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 Derby server
- OpenJPA with H2 server
- OpenJPA with MySQL server
- OpenJPA with PostgreSQL server
- ObjectDB embedded
- ObjectDB server
Hibernate with SQLite 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 HSQLDB 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