Comparison of EclipseLink with HSQLDB embedded vs Hibernate with PostgreSQL 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 Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | EclipseLink HSQLDB embedded | Hibernate PostgreSQL server | EclipseLink HSQLDB embedded | Hibernate PostgreSQL server | EclipseLink HSQLDB embedded | Hibernate PostgreSQL server |
Basic Person Test | 27.1 | 7.1 | 17.2 | 3.4 | 22.2 | 5.2 |
Element Collection Test | 17.2 | 2.9 | 8.2 | 1.7 | 12.7 | 2.3 |
Inheritance Test | 26.7 | 7.0 | 11.9 | 3.6 | 19.3 | 5.3 |
Indexing Test | 30.6 | 9.3 | 18.6 | 6.1 | 24.6 | 7.7 |
Graph (Binary Tree) Test | 20.0 | 3.0 | 15.9 | 2.9 | 18.0 | 2.9 |
Multithreading Test | 32.5 | 31.7 | 11.4 | 13.9 | 22.0 | 22.8 |
All Tests | 25.7 | 10.2 | 13.9 | 5.3 | 19.8 | 7.7 |
The results above show that in general EclipseLink with HSQLDB embedded is more efficient than Hibernate with PostgreSQL server in persisting JPA entity objects to the database. Comparing the normalized speed of Hibernate with PostgreSQL database server (7.7) to the normalized speed of EclipseLink with HSQLDB embedded database (19.8) reveals that in these tests, EclipseLink with HSQLDB embedded is 2.6 times faster than Hibernate with PostgreSQL server.
A large performance gap has been detected when using graphs of objects with small transaction size. Comparing the normalized speed of Hibernate with PostgreSQL database server (3.0) to the normalized speed of EclipseLink with HSQLDB embedded database (20.0) reveals that in that case, EclipseLink with HSQLDB embedded is 6.7 times faster than Hibernate with PostgreSQL server.
Speed comparison of JPA database retrieval operations (normalized score, higher is better)
Retrieval Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | EclipseLink HSQLDB embedded | Hibernate PostgreSQL server | EclipseLink HSQLDB embedded | Hibernate PostgreSQL server | EclipseLink HSQLDB embedded | Hibernate PostgreSQL server |
Basic Person Test | 24.4 | 5.5 | 36.0 | 11.5 | 30.2 | 8.5 |
Element Collection Test | 14.9 | 0.025 | 19.1 | 0.017 | 17.0 | 0.021 |
Inheritance Test | 22.8 | 5.2 | 40.0 | 14.0 | 31.4 | 9.6 |
Indexing Test | 20.7 | 4.6 | 38.7 | 13.3 | 29.7 | 8.9 |
Graph (Binary Tree) Test | 8.7 | 0.61 | 14.2 | 0.78 | 11.4 | 0.70 |
Multithreading Test | 24.2 | 11.3 | 28.0 | 17.0 | 26.1 | 14.2 |
All Tests | 19.3 | 4.5 | 29.3 | 9.4 | 24.3 | 7.0 |
The results above show that in general EclipseLink with HSQLDB embedded is much more efficient than Hibernate with PostgreSQL server in retrieving JPA entity objects from the database. Comparing the normalized speed of Hibernate with PostgreSQL database server (7.0) to the normalized speed of EclipseLink with HSQLDB embedded database (24.3) reveals that in these tests, EclipseLink with HSQLDB embedded is 3.5 times faster than Hibernate with PostgreSQL server.
A huge performance gap has been detected when using JPA element collections with large retrieval size. Comparing the normalized speed of Hibernate with PostgreSQL database server (0.017) to the normalized speed of EclipseLink with HSQLDB embedded database (19.1) reveals that in that case, EclipseLink with HSQLDB embedded is 1,124 times faster than Hibernate with PostgreSQL server.
Speed comparison of JPA database query operations (normalized score, higher is better)
Retrieval Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | EclipseLink HSQLDB embedded | Hibernate PostgreSQL server | EclipseLink HSQLDB embedded | Hibernate PostgreSQL server | EclipseLink HSQLDB embedded | Hibernate PostgreSQL server |
Basic Person Test | 2.9 | 55.5 | 0.88 | 6.1 | 1.9 | 30.8 |
Element Collection Test | 3.2 | 11.0 | 1.4 | 0.016 | 2.3 | 5.5 |
Inheritance Test | 2.6 | 52.3 | 1.1 | 8.7 | 1.9 | 30.5 |
Indexing Test | 21.5 | 0.050 | 33.3 | 8.8 | 27.4 | 4.4 |
Multithreading Test | 1.1 | 55.2 | 0.52 | 9.2 | 0.82 | 32.2 |
All Tests | 6.3 | 34.8 | 7.4 | 6.6 | 6.9 | 20.7 |
The results above show that in general Hibernate with PostgreSQL server is more efficient than EclipseLink with HSQLDB embedded in executing the tested JPA queries. Comparing the normalized speed of EclipseLink with HSQLDB embedded database (6.9) to the normalized speed of Hibernate with PostgreSQL database server (20.7) reveals that in these tests, Hibernate with PostgreSQL server is 3.0 times faster than EclipseLink with HSQLDB embedded.
A huge performance gap has been detected when using multithreading with small retrieval size. Comparing the normalized speed of EclipseLink with HSQLDB embedded database (1.1) to the normalized speed of Hibernate with PostgreSQL database server (55.2) reveals that in that case, Hibernate with PostgreSQL server is 50.2 times faster than EclipseLink with HSQLDB embedded.
On the other hand, Hibernate with PostgreSQL server is slower, for instance, when using database indexes with small retrieval size. Comparing the normalized speed of Hibernate with PostgreSQL database server (0.050) to the normalized speed of EclipseLink with HSQLDB embedded database (21.5) reveals that in that case, Hibernate with PostgreSQL server is 430 times slower than EclipseLink with HSQLDB embedded.
Speed comparison of JPA database update operations (normalized score, higher is better)
Transaction Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | EclipseLink HSQLDB embedded | Hibernate PostgreSQL server | EclipseLink HSQLDB embedded | Hibernate PostgreSQL server | EclipseLink HSQLDB embedded | Hibernate PostgreSQL server |
Basic Person Test | 17.9 | 5.3 | 7.0 | 2.7 | 12.5 | 4.0 |
Element Collection Test | 14.6 | 0.067 | 8.3 | 0.026 | 11.4 | 0.046 |
Inheritance Test | 16.2 | 5.4 | 9.7 | 3.8 | 13.0 | 4.6 |
Indexing Test | 12.0 | 5.4 | 6.8 | 4.3 | 9.4 | 4.8 |
Graph (Binary Tree) Test | 4.7 | 1.1 | 3.4 | 0.58 | 4.0 | 0.82 |
Multithreading Test | 24.4 | 29.6 | 4.4 | 6.3 | 14.4 | 18.0 |
All Tests | 15.0 | 7.8 | 6.6 | 2.9 | 10.8 | 5.4 |
The results above show that in general EclipseLink with HSQLDB embedded is more efficient than Hibernate with PostgreSQL server in updating JPA entity objects in the database. Comparing the normalized speed of Hibernate with PostgreSQL database server (5.4) to the normalized speed of EclipseLink with HSQLDB embedded database (10.8) reveals that in these tests, EclipseLink with HSQLDB embedded is 2.0 times faster than Hibernate with PostgreSQL server.
A huge performance gap has been detected when using JPA element collections with large transaction size. Comparing the normalized speed of Hibernate with PostgreSQL database server (0.026) to the normalized speed of EclipseLink with HSQLDB embedded database (8.3) reveals that in that case, EclipseLink with HSQLDB embedded is 319 times faster than Hibernate with PostgreSQL server.
Speed comparison of JPA database removal operations (normalized score, higher is better)
Transaction Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | EclipseLink HSQLDB embedded | Hibernate PostgreSQL server | EclipseLink HSQLDB embedded | Hibernate PostgreSQL server | EclipseLink HSQLDB embedded | Hibernate PostgreSQL server |
Basic Person Test | 32.3 | 5.3 | 20.3 | 4.2 | 26.3 | 4.8 |
Element Collection Test | 14.3 | 0.020 | 6.0 | stopped | 10.2 | 0.0098 |
Inheritance Test | 29.2 | 5.1 | 23.9 | 4.2 | 26.6 | 4.6 |
Indexing Test | 55.3 | 9.5 | 27.1 | 6.3 | 41.2 | 7.9 |
Graph (Binary Tree) Test | 6.8 | 0.012 | 14.1 | 0.012 | 10.4 | 0.012 |
Multithreading Test | 52.9 | 23.3 | 28.4 | 21.8 | 40.6 | 22.5 |
All Tests | 31.8 | 7.2 | 20.0 | 6.1 | 25.9 | 6.6 |
The results above show that in general EclipseLink with HSQLDB embedded is much more efficient than Hibernate with PostgreSQL server in deleting JPA entity objects from the database. Comparing the normalized speed of Hibernate with PostgreSQL database server (6.6) to the normalized speed of EclipseLink with HSQLDB embedded database (25.9) reveals that in these tests, EclipseLink with HSQLDB embedded is 3.9 times faster than Hibernate with PostgreSQL server.
A huge performance gap has been detected when using graphs of objects with large transaction size. Comparing the normalized speed of Hibernate with PostgreSQL database server (0.012) to the normalized speed of EclipseLink with HSQLDB embedded database (14.1) reveals that in that case, EclipseLink with HSQLDB embedded is 1,175 times faster than Hibernate with PostgreSQL server.
Comparison of JPA/Database speed - the averages (normalized score, higher is better)
Transaction/Retrieval Size | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | EclipseLink HSQLDB embedded | Hibernate PostgreSQL server | EclipseLink HSQLDB embedded | Hibernate PostgreSQL server | EclipseLink HSQLDB embedded | Hibernate PostgreSQL server |
Basic Person Test | 20.9 | 15.7 | 16.3 | 5.6 | 18.6 | 10.7 |
Element Collection Test | 12.8 | 2.8 | 8.6 | 0.35 | 10.7 | 1.6 |
Inheritance Test | 19.5 | 15.0 | 17.3 | 6.9 | 18.4 | 10.9 |
Indexing Test | 28.0 | 5.8 | 24.9 | 7.8 | 26.5 | 6.8 |
Graph (Binary Tree) Test | 10.0 | 1.2 | 11.9 | 1.1 | 11.0 | 1.1 |
Multithreading Test | 27.0 | 30.2 | 14.6 | 13.6 | 20.8 | 21.9 |
All Tests | 20.1 | 12.1 | 15.7 | 6.0 | 17.9 | 9.1 |
The results above show that in general EclipseLink with HSQLDB embedded is more efficient than Hibernate with PostgreSQL server in performing JPA database operations.
A huge performance gap has been detected when using JPA element collections with large transaction/retrieval size. Comparing the normalized speed of Hibernate with PostgreSQL database server (0.35) to the normalized speed of EclipseLink with HSQLDB embedded database (8.6) reveals that in that case, EclipseLink with HSQLDB embedded is 24.6 times faster than Hibernate with PostgreSQL server.
Other Head to Head DBMS/JPA Comparisons
EclipseLink 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 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 HSQLDB embedded
- OpenJPA with Derby server
- OpenJPA with H2 server
- OpenJPA with MySQL server
- OpenJPA with PostgreSQL server
- ObjectDB embedded
- ObjectDB server
Hibernate with PostgreSQL server 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
- 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