Comparison of Hibernate with H2 embedded vs EclipseLink 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 | |||
---|---|---|---|---|---|---|
  | Hibernate H2 embedded | EclipseLink SQLite embedded | Hibernate H2 embedded | EclipseLink SQLite embedded | Hibernate H2 embedded | EclipseLink SQLite embedded |
Basic Person Test | 18.1 | 0.074 | 9.0 | 0.90 | 13.5 | 0.49 |
Element Collection Test | 13.0 | 0.061 | 6.8 | 0.65 | 9.9 | 0.36 |
Inheritance Test | 21.0 | 0.083 | 9.4 | 0.82 | 15.2 | 0.45 |
Indexing Test | 29.9 | 0.11 | 18.4 | 1.6 | 24.1 | 0.87 |
Graph (Binary Tree) Test | 17.2 | 0.24 | 20.1 | 0.91 | 18.7 | 0.57 |
Multithreading Test | 36.9 | 0.10 | 11.5 | 2.1 | 24.2 | 1.1 |
All Tests | 22.6 | 0.11 | 12.5 | 1.2 | 17.6 | 0.64 |
The results above show that in general Hibernate with H2 embedded is much more efficient than EclipseLink with SQLite embedded in persisting JPA entity objects to the database. Comparing the normalized speed of EclipseLink with SQLite embedded database (0.64) to the normalized speed of Hibernate with H2 embedded database (17.6) reveals that in these tests, Hibernate with H2 embedded is 27.5 times faster than EclipseLink with SQLite embedded.
A huge performance gap has been detected when using multithreading with small transaction size. Comparing the normalized speed of EclipseLink with SQLite embedded database (0.10) to the normalized speed of Hibernate with H2 embedded database (36.9) reveals that in that case, Hibernate with H2 embedded is 369 times faster than EclipseLink with SQLite embedded.
Speed comparison of JPA database retrieval operations (normalized score, higher is better)
Retrieval Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | Hibernate H2 embedded | EclipseLink SQLite embedded | Hibernate H2 embedded | EclipseLink SQLite embedded | Hibernate H2 embedded | EclipseLink SQLite embedded |
Basic Person Test | 16.6 | failed | 13.3 | failed | 15.0 | failed |
Element Collection Test | 4.3 | 0.0007 | 4.0 | failed | 4.1 | 0.0007 |
Inheritance Test | 10.4 | failed | 17.5 | failed | 13.9 | failed |
Indexing Test | 10.8 | failed | 15.2 | failed | 13.0 | failed |
Graph (Binary Tree) Test | 2.5 | failed | 4.0 | failed | 3.3 | failed |
Multithreading Test | 16.2 | failed | 15.7 | failed | 15.9 | failed |
All Tests | 10.1 | 0.0007 | 11.6 | failed | 10.9 | 0.0007 |
EclipseLink with SQLite embedded has failed in 11 tests (see exceptions).
Speed comparison of JPA database query operations (normalized score, higher is better)
Retrieval Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | Hibernate H2 embedded | EclipseLink SQLite embedded | Hibernate H2 embedded | EclipseLink SQLite embedded | Hibernate H2 embedded | EclipseLink SQLite embedded |
Basic Person Test | 4.5 | 1.2 | 1.2 | failed | 2.8 | 1.2 |
Element Collection Test | 4.4 | 0.29 | 1.4 | failed | 2.9 | 0.29 |
Inheritance Test | 3.1 | 0.69 | 1.5 | failed | 2.3 | 0.69 |
Indexing Test | 6.6 | 0.0008 | 10.5 | failed | 8.6 | 0.0008 |
Multithreading Test | 1.2 | failed | 0.59 | failed | 0.89 | failed |
All Tests | 4.0 | 0.55 | 3.0 | failed | 3.5 | 0.55 |
EclipseLink with SQLite embedded has failed in 6 tests (see exceptions).
Speed comparison of JPA database update operations (normalized score, higher is better)
Transaction Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | Hibernate H2 embedded | EclipseLink SQLite embedded | Hibernate H2 embedded | EclipseLink SQLite embedded | Hibernate H2 embedded | EclipseLink SQLite embedded |
Basic Person Test | 12.1 | failed | 6.5 | failed | 9.3 | failed |
Element Collection Test | 7.4 | 0.0016 | 5.3 | failed | 6.3 | 0.0016 |
Inheritance Test | 10.8 | failed | 8.5 | failed | 9.6 | failed |
Indexing Test | 10.0 | failed | 7.5 | failed | 8.8 | failed |
Graph (Binary Tree) Test | 4.4 | failed | 2.3 | failed | 3.4 | failed |
Multithreading Test | 16.2 | failed | 4.0 | failed | 10.1 | failed |
All Tests | 10.1 | 0.0016 | 5.7 | failed | 7.9 | 0.0016 |
EclipseLink with SQLite embedded has failed in 11 tests (see exceptions).
Speed comparison of JPA database removal operations (normalized score, higher is better)
Transaction Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | Hibernate H2 embedded | EclipseLink SQLite embedded | Hibernate H2 embedded | EclipseLink SQLite embedded | Hibernate H2 embedded | EclipseLink SQLite embedded |
Basic Person Test | 19.7 | failed | 11.4 | failed | 15.5 | failed |
Element Collection Test | 6.9 | 0.0006 | 4.5 | failed | 5.7 | 0.0006 |
Inheritance Test | 15.6 | failed | 12.9 | failed | 14.2 | failed |
Indexing Test | 23.2 | failed | 12.4 | failed | 17.8 | failed |
Graph (Binary Tree) Test | 4.0 | failed | 4.2 | failed | 4.1 | failed |
Multithreading Test | 27.4 | failed | 22.7 | failed | 25.0 | failed |
All Tests | 16.1 | 0.0006 | 11.4 | failed | 13.7 | 0.0006 |
EclipseLink with SQLite embedded has failed in 11 tests (see exceptions).
Comparison of database storage efficiency (normalized score, higher is better)
Transaction Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | Hibernate H2 embedded | EclipseLink SQLite embedded | Hibernate H2 embedded | EclipseLink SQLite embedded | Hibernate H2 embedded | EclipseLink SQLite embedded |
Basic Person Test | 27.0 | 79.4 | 27.0 | 79.4 | 27.0 | 79.4 |
Element Collection Test | 30.6 | 74.5 | 30.6 | 74.5 | 30.6 | 74.5 |
Inheritance Test | 27.0 | 75.0 | 27.0 | 75.0 | 27.0 | 75.0 |
Indexing Test | 31.6 | 92.9 | 32.1 | 94.5 | 31.9 | 93.7 |
Graph (Binary Tree) Test | 28.5 | 60.6 | 21.4 | 48.4 | 25.0 | 54.5 |
Multithreading Test | 33.9 | 100 | 9.2 | 100 | 21.5 | 100 |
All Tests | 29.8 | 80.4 | 24.6 | 78.6 | 27.2 | 79.5 |
The results above show that in general EclipseLink with SQLite embedded is more efficient than Hibernate with H2 embedded in using disk space. Comparing the normalized score of Hibernate with H2 embedded database (27.2) to the normalized score of EclipseLink with SQLite embedded database (79.5) reveals that in these tests, EclipseLink with SQLite embedded is 2.9 times more efficient than Hibernate with H2 embedded.
A huge gap has been detected when using multithreading with large transaction size. Comparing the normalized score of Hibernate with H2 embedded database (9.2) to the normalized score of EclipseLink with SQLite embedded database (100) reveals that in that case, EclipseLink with SQLite embedded is 10.9 times more efficient than Hibernate with H2 embedded.
Comparison of JPA/Database speed - the averages (normalized score, higher is better)
Transaction/Retrieval Size | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | Hibernate H2 embedded | EclipseLink SQLite embedded | Hibernate H2 embedded | EclipseLink SQLite embedded | Hibernate H2 embedded | EclipseLink SQLite embedded |
Basic Person Test | 14.2 | 0.66 | 8.3 | 0.90 | 11.2 | 0.74 |
Element Collection Test | 7.2 | 0.070 | 4.4 | 0.65 | 5.8 | 0.17 |
Inheritance Test | 12.2 | 0.38 | 9.9 | 0.82 | 11.0 | 0.53 |
Indexing Test | 16.1 | 0.058 | 12.8 | 1.6 | 14.5 | 0.58 |
Graph (Binary Tree) Test | 7.0 | 0.24 | 7.7 | 0.91 | 7.3 | 0.57 |
Multithreading Test | 19.6 | 0.10 | 10.9 | 2.1 | 15.2 | 1.1 |
All Tests | 12.9 | 0.22 | 9.0 | 1.2 | 11.0 | 0.52 |
The results above show that in general Hibernate with H2 embedded is much more efficient than EclipseLink with SQLite embedded in performing JPA database operations. Comparing the normalized speed of EclipseLink with SQLite embedded database (0.52) to the normalized speed of Hibernate with H2 embedded database (11.0) reveals that in these tests, Hibernate with H2 embedded is 21.2 times faster than EclipseLink with SQLite embedded.
A huge performance gap has been detected when using database indexes with small transaction/retrieval size. Comparing the normalized speed of EclipseLink with SQLite embedded database (0.058) to the normalized speed of Hibernate with H2 embedded database (16.1) reveals that in that case, Hibernate with H2 embedded is 278 times faster than EclipseLink with SQLite embedded.
Other Head to Head DBMS/JPA Comparisons
Hibernate with H2 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 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
EclipseLink 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 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 HSQLDB embedded
- OpenJPA with Derby server
- OpenJPA with H2 server
- OpenJPA with MySQL server
- OpenJPA with PostgreSQL server
- ObjectDB embedded
- ObjectDB server