Comparison of OpenJPA with Derby 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 Derby embedded | Hibernate SQLite embedded | OpenJPA Derby embedded | Hibernate SQLite embedded | OpenJPA Derby embedded | Hibernate SQLite embedded |
Basic Person Test | 4.8 | 0.083 | 2.9 | 1.0 | 3.9 | 0.55 |
Element Collection Test | 2.8 | 0.067 | 1.9 | 0.69 | 2.4 | 0.38 |
Inheritance Test | 4.1 | 0.080 | 2.4 | 0.99 | 3.3 | 0.54 |
Indexing Test | 6.1 | 0.098 | 4.1 | 1.0 | 5.1 | 0.55 |
Graph (Binary Tree) Test | 1.5 | 0.27 | 1.4 | 0.96 | 1.4 | 0.61 |
Multithreading Test | 8.7 | failed | 3.3 | failed | 6.0 | failed |
All Tests | 4.7 | 0.12 | 2.7 | 0.93 | 3.7 | 0.53 |
Hibernate with SQLite embedded has failed in 2 tests (see exceptions).
The results above show that in general OpenJPA with Derby 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 Derby embedded database (3.7) reveals that in these tests, OpenJPA with Derby embedded is 7.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.098) to the normalized speed of OpenJPA with Derby embedded database (6.1) reveals that in that case, OpenJPA with Derby embedded is 62.2 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 Derby embedded | Hibernate SQLite embedded | OpenJPA Derby embedded | Hibernate SQLite embedded | OpenJPA Derby embedded | Hibernate SQLite embedded |
Basic Person Test | 14.8 | 1.8 | 22.6 | 1.3 | 18.7 | 1.5 |
Element Collection Test | 0.0031 | 0.0008 | 2.3 | failed | 1.2 | 0.0008 |
Inheritance Test | 0.015 | 2.4 | 7.0 | 1.4 | 3.5 | 1.9 |
Indexing Test | 11.7 | 1.9 | 26.5 | 2.3 | 19.1 | 2.1 |
Graph (Binary Tree) Test | 0.93 | 0.56 | 1.2 | 0.88 | 1.1 | 0.72 |
Multithreading Test | 25.2 | failed | 28.6 | failed | 26.9 | failed |
All Tests | 8.8 | 1.3 | 14.7 | 1.5 | 11.7 | 1.4 |
Hibernate with SQLite embedded has failed in 3 tests (see exceptions).
The results above show that in general OpenJPA with Derby 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 Derby embedded database (11.7) reveals that in these tests, OpenJPA with Derby embedded is 8.4 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 Derby embedded database (22.6) reveals that in that case, OpenJPA with Derby embedded is 17.4 times faster than Hibernate with SQLite embedded.
On the other hand, OpenJPA with Derby embedded is slower, for instance, when using class inheritance in the object model with small retrieval size. Comparing the normalized speed of OpenJPA with Derby embedded database (0.015) to the normalized speed of Hibernate with SQLite embedded database (2.4) reveals that in that case, OpenJPA with Derby embedded is 160 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 Derby embedded | Hibernate SQLite embedded | OpenJPA Derby embedded | Hibernate SQLite embedded | OpenJPA Derby embedded | Hibernate SQLite embedded |
Basic Person Test | 49.7 | 1.1 | 9.9 | 0.22 | 29.8 | 0.65 |
Element Collection Test | 2.7 | 0.39 | 9.6 | failed | 6.1 | 0.39 |
Inheritance Test | 2.3 | 0.53 | 1.3 | 0.28 | 1.8 | 0.40 |
Indexing Test | 7.0 | 0.0011 | 17.1 | 0.43 | 12.1 | 0.21 |
Multithreading Test | 40.9 | failed | 11.7 | failed | 26.3 | failed |
All Tests | 20.5 | 0.50 | 9.9 | 0.31 | 15.2 | 0.42 |
Hibernate with SQLite embedded has failed in 3 tests (see exceptions).
The results above show that in general OpenJPA with Derby 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 Derby embedded database (15.2) reveals that in these tests, OpenJPA with Derby embedded is 36.2 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 Derby embedded database (7.0) reveals that in that case, OpenJPA with Derby embedded is 6,364 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 Derby embedded | Hibernate SQLite embedded | OpenJPA Derby embedded | Hibernate SQLite embedded | OpenJPA Derby embedded | Hibernate SQLite embedded |
Basic Person Test | 5.6 | 0.076 | 5.2 | 0.65 | 5.4 | 0.37 |
Element Collection Test | 0.0090 | 0.0022 | 2.2 | failed | 1.1 | 0.0022 |
Inheritance Test | 0.045 | 0.079 | 4.6 | 0.97 | 2.3 | 0.53 |
Indexing Test | 6.1 | 0.057 | 8.7 | 0.54 | 7.4 | 0.30 |
Graph (Binary Tree) Test | 1.6 | 0.26 | 0.91 | 0.42 | 1.3 | 0.34 |
Multithreading Test | 18.3 | failed | 4.5 | failed | 11.4 | failed |
All Tests | 5.3 | 0.094 | 4.4 | 0.65 | 4.8 | 0.34 |
Hibernate with SQLite embedded has failed in 3 tests (see exceptions).
The results above show that in general OpenJPA with Derby 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 Derby embedded database (4.8) reveals that in these tests, OpenJPA with Derby embedded is 14.1 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 Derby embedded database (6.1) reveals that in that case, OpenJPA with Derby embedded is 107 times faster 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 Derby embedded | Hibernate SQLite embedded | OpenJPA Derby embedded | Hibernate SQLite embedded | OpenJPA Derby embedded | Hibernate SQLite embedded |
Basic Person Test | 4.2 | 0.061 | 4.5 | 0.91 | 4.3 | 0.49 |
Element Collection Test | 0.0071 | 0.0007 | 1.6 | failed | 0.80 | 0.0007 |
Inheritance Test | 0.035 | 0.058 | 3.0 | 0.90 | 1.5 | 0.48 |
Indexing Test | 5.3 | 0.079 | 3.6 | 0.54 | 4.4 | 0.31 |
Graph (Binary Tree) Test | 0.80 | 0.24 | 0.93 | 0.80 | 0.86 | 0.52 |
Multithreading Test | 5.7 | failed | 6.2 | failed | 6.0 | failed |
All Tests | 2.7 | 0.088 | 3.3 | 0.79 | 3.0 | 0.40 |
Hibernate with SQLite embedded has failed in 3 tests (see exceptions).
The results above show that in general OpenJPA with Derby 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 Derby embedded database (3.0) reveals that in these tests, OpenJPA with Derby embedded is 7.5 times faster than Hibernate with SQLite embedded.
A huge performance gap has been detected when using simple basic entities with small transaction size. Comparing the normalized speed of Hibernate with SQLite embedded database (0.061) to the normalized speed of OpenJPA with Derby embedded database (4.2) reveals that in that case, OpenJPA with Derby embedded is 68.9 times faster than Hibernate with SQLite embedded.
Comparison of database storage efficiency (normalized score, higher is better)
Transaction Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | OpenJPA Derby embedded | Hibernate SQLite embedded | OpenJPA Derby embedded | Hibernate SQLite embedded | OpenJPA Derby embedded | Hibernate SQLite embedded |
Basic Person Test | 52.8 | 90.2 | 52.8 | 90.2 | 52.8 | 90.2 |
Element Collection Test | 42.4 | 82.0 | 42.4 | 82.0 | 42.4 | 82.0 |
Inheritance Test | 44.2 | 80.5 | 44.2 | 80.5 | 44.2 | 80.5 |
Indexing Test | 53.1 | 93.4 | 54.0 | 94.8 | 53.5 | 94.1 |
Graph (Binary Tree) Test | 12.8 | 67.9 | 9.6 | 50.9 | 11.2 | 59.4 |
Multithreading Test | 50.7 | failed | 9.7 | failed | 30.2 | failed |
All Tests | 42.7 | 82.8 | 35.5 | 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 Derby embedded in using disk space. Comparing the normalized score of OpenJPA with Derby 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 Derby embedded.
A large gap has been detected when using graphs of objects with small transaction size. Comparing the normalized score of OpenJPA with Derby embedded database (12.8) to the normalized score of Hibernate with SQLite embedded database (67.9) reveals that in that case, Hibernate with SQLite embedded is 5.3 times more efficient than OpenJPA with Derby embedded.
Comparison of JPA/Database speed - the averages (normalized score, higher is better)
Transaction/Retrieval Size | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | OpenJPA Derby embedded | Hibernate SQLite embedded | OpenJPA Derby embedded | Hibernate SQLite embedded | OpenJPA Derby embedded | Hibernate SQLite embedded |
Basic Person Test | 15.8 | 0.63 | 9.0 | 0.81 | 12.4 | 0.72 |
Element Collection Test | 1.1 | 0.092 | 3.5 | 0.69 | 2.3 | 0.19 |
Inheritance Test | 1.3 | 0.63 | 3.7 | 0.91 | 2.5 | 0.77 |
Indexing Test | 7.2 | 0.42 | 12.0 | 0.96 | 9.6 | 0.69 |
Graph (Binary Tree) Test | 1.2 | 0.33 | 1.1 | 0.77 | 1.2 | 0.55 |
Multithreading Test | 19.8 | failed | 10.9 | failed | 15.3 | failed |
All Tests | 8.0 | 0.42 | 6.9 | 0.86 | 7.4 | 0.62 |
The results above show that in general OpenJPA with Derby 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 Derby embedded database (7.4) reveals that in these tests, OpenJPA with Derby embedded is 11.9 times faster than Hibernate with SQLite embedded.
A huge performance gap has been detected when using simple basic entities with small transaction/retrieval size. Comparing the normalized speed of Hibernate with SQLite embedded database (0.63) to the normalized speed of OpenJPA with Derby embedded database (15.8) reveals that in that case, OpenJPA with Derby embedded is 25.1 times faster than Hibernate with SQLite embedded.
Other Head to Head DBMS/JPA Comparisons
OpenJPA 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 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 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 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