Comparison of EclipseLink with PostgreSQL server 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 | |||
---|---|---|---|---|---|---|
  | EclipseLink PostgreSQL server | Hibernate HSQLDB embedded | EclipseLink PostgreSQL server | Hibernate HSQLDB embedded | EclipseLink PostgreSQL server | Hibernate HSQLDB embedded |
Basic Person Test | 7.3 | 32.6 | 4.2 | 13.1 | 5.8 | 22.9 |
Element Collection Test | 3.1 | 15.1 | 1.9 | 8.2 | 2.5 | 11.7 |
Inheritance Test | 6.9 | 25.5 | 5.0 | 13.6 | 5.9 | 19.5 |
Indexing Test | 10.0 | 29.6 | 6.8 | 18.8 | 8.4 | 24.2 |
Graph (Binary Tree) Test | 3.5 | 13.8 | 3.3 | 15.6 | 3.4 | 14.7 |
Multithreading Test | 31.8 | 37.4 | 14.5 | 13.0 | 23.1 | 25.2 |
All Tests | 10.4 | 25.6 | 6.0 | 13.7 | 8.2 | 19.7 |
The results above show that in general Hibernate with HSQLDB embedded is more efficient than EclipseLink with PostgreSQL server in persisting JPA entity objects to the database. Comparing the normalized speed of EclipseLink with PostgreSQL database server (8.2) to the normalized speed of Hibernate with HSQLDB embedded database (19.7) reveals that in these tests, Hibernate with HSQLDB embedded is 2.4 times faster than EclipseLink with PostgreSQL server.
A large performance gap has been detected when using JPA element collections with small transaction size. Comparing the normalized speed of EclipseLink with PostgreSQL database server (3.1) to the normalized speed of Hibernate with HSQLDB embedded database (15.1) reveals that in that case, Hibernate with HSQLDB embedded is 4.9 times faster than EclipseLink with PostgreSQL server.
Speed comparison of JPA database retrieval operations (normalized score, higher is better)
Retrieval Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | EclipseLink PostgreSQL server | Hibernate HSQLDB embedded | EclipseLink PostgreSQL server | Hibernate HSQLDB embedded | EclipseLink PostgreSQL server | Hibernate HSQLDB embedded |
Basic Person Test | 6.8 | 24.8 | 17.2 | 16.4 | 12.0 | 20.6 |
Element Collection Test | 0.026 | 11.3 | 0.020 | 10.8 | 0.023 | 11.0 |
Inheritance Test | 6.0 | 21.7 | 19.7 | 21.0 | 12.9 | 21.3 |
Indexing Test | 5.6 | 11.9 | 19.5 | 21.5 | 12.6 | 16.7 |
Graph (Binary Tree) Test | 0.47 | 3.6 | 0.61 | 4.7 | 0.54 | 4.1 |
Multithreading Test | 13.5 | 19.8 | 27.8 | 21.5 | 20.6 | 20.6 |
All Tests | 5.4 | 15.5 | 14.1 | 16.0 | 9.8 | 15.7 |
The results above show that in general Hibernate with HSQLDB embedded is more efficient than EclipseLink with PostgreSQL server in retrieving JPA entity objects from the database.
A huge performance gap has been detected when using JPA element collections with large retrieval size. Comparing the normalized speed of EclipseLink with PostgreSQL database server (0.020) to the normalized speed of Hibernate with HSQLDB embedded database (10.8) reveals that in that case, Hibernate with HSQLDB embedded is 540 times faster than EclipseLink with PostgreSQL server.
Speed comparison of JPA database query operations (normalized score, higher is better)
Retrieval Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | EclipseLink PostgreSQL server | Hibernate HSQLDB embedded | EclipseLink PostgreSQL server | Hibernate HSQLDB embedded | EclipseLink PostgreSQL server | Hibernate HSQLDB embedded |
Basic Person Test | 55.5 | 3.6 | 7.8 | 0.88 | 31.6 | 2.2 |
Element Collection Test | 15.4 | 3.4 | 0.028 | 1.7 | 7.7 | 2.6 |
Inheritance Test | 54.9 | 2.9 | 11.5 | 1.0 | 33.2 | 1.9 |
Indexing Test | 0.077 | 9.9 | 10.0 | 21.7 | 5.1 | 15.8 |
Multithreading Test | 55.3 | 1.1 | 12.0 | 0.58 | 33.7 | 0.82 |
All Tests | 36.2 | 4.2 | 8.3 | 5.2 | 22.3 | 4.7 |
The results above show that in general EclipseLink with PostgreSQL server 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 EclipseLink with PostgreSQL database server (22.3) reveals that in these tests, EclipseLink with PostgreSQL server is 4.7 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 EclipseLink with PostgreSQL database server (55.3) reveals that in that case, EclipseLink with PostgreSQL server is 50.3 times faster than Hibernate with HSQLDB embedded.
On the other hand, EclipseLink with PostgreSQL server is slower, for instance, when using database indexes with small retrieval size. Comparing the normalized speed of EclipseLink with PostgreSQL database server (0.077) to the normalized speed of Hibernate with HSQLDB embedded database (9.9) reveals that in that case, EclipseLink with PostgreSQL server is 129 times slower 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 | |||
---|---|---|---|---|---|---|
  | EclipseLink PostgreSQL server | Hibernate HSQLDB embedded | EclipseLink PostgreSQL server | Hibernate HSQLDB embedded | EclipseLink PostgreSQL server | Hibernate HSQLDB embedded |
Basic Person Test | 6.2 | 14.2 | 4.1 | 5.0 | 5.1 | 9.6 |
Element Collection Test | 0.080 | 10.1 | 0.028 | 5.6 | 0.054 | 7.8 |
Inheritance Test | 6.4 | 13.4 | 6.1 | 7.5 | 6.2 | 10.5 |
Indexing Test | 6.5 | 10.7 | 7.0 | 6.1 | 6.8 | 8.4 |
Graph (Binary Tree) Test | 0.90 | 3.7 | 0.50 | 2.5 | 0.70 | 3.1 |
Multithreading Test | 36.0 | 23.9 | 9.1 | 3.8 | 22.5 | 13.9 |
All Tests | 9.3 | 12.7 | 4.5 | 5.1 | 6.9 | 8.9 |
The results above show that in general Hibernate with HSQLDB embedded is slightly more efficient than EclipseLink with PostgreSQL server in updating JPA entity objects in the database.
A huge performance gap has been detected when using JPA element collections with large transaction size. Comparing the normalized speed of EclipseLink with PostgreSQL database server (0.028) to the normalized speed of Hibernate with HSQLDB embedded database (5.6) reveals that in that case, Hibernate with HSQLDB embedded is 200 times faster than EclipseLink with PostgreSQL server.
On the other hand, Hibernate with HSQLDB embedded is slower, for instance, when using multithreading with large transaction size. Comparing the normalized speed of Hibernate with HSQLDB embedded database (3.8) to the normalized speed of EclipseLink with PostgreSQL database server (9.1) reveals that in that case, Hibernate with HSQLDB embedded is 2.4 times slower than EclipseLink with PostgreSQL server.
Speed comparison of JPA database removal operations (normalized score, higher is better)
Transaction Size => | Few Entities | Many Entities | Average Score | |||
---|---|---|---|---|---|---|
  | EclipseLink PostgreSQL server | Hibernate HSQLDB embedded | EclipseLink PostgreSQL server | Hibernate HSQLDB embedded | EclipseLink PostgreSQL server | Hibernate HSQLDB embedded |
Basic Person Test | 5.7 | 26.1 | 5.7 | 17.5 | 5.7 | 21.8 |
Element Collection Test | 0.025 | 9.1 | stopped | 5.2 | 0.012 | 7.1 |
Inheritance Test | 5.5 | 21.4 | 5.4 | 17.7 | 5.4 | 19.6 |
Indexing Test | 10.4 | 33.0 | 10.0 | 16.3 | 10.2 | 24.7 |
Graph (Binary Tree) Test | 0.016 | 5.4 | 0.013 | 8.2 | 0.015 | 6.8 |
Multithreading Test | 26.3 | 38.5 | 16.8 | 28.6 | 21.6 | 33.5 |
All Tests | 8.0 | 22.3 | 6.3 | 15.6 | 7.2 | 18.9 |
The results above show that in general Hibernate with HSQLDB embedded is more efficient than EclipseLink with PostgreSQL server in deleting JPA entity objects from the database. Comparing the normalized speed of EclipseLink with PostgreSQL database server (7.2) to the normalized speed of Hibernate with HSQLDB embedded database (18.9) reveals that in these tests, Hibernate with HSQLDB embedded is 2.6 times faster than EclipseLink with PostgreSQL server.
A huge performance gap has been detected when using graphs of objects with large transaction size. Comparing the normalized speed of EclipseLink with PostgreSQL database server (0.013) to the normalized speed of Hibernate with HSQLDB embedded database (8.2) reveals that in that case, Hibernate with HSQLDB embedded is 631 times faster than EclipseLink 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 PostgreSQL server | Hibernate HSQLDB embedded | EclipseLink PostgreSQL server | Hibernate HSQLDB embedded | EclipseLink PostgreSQL server | Hibernate HSQLDB embedded |
Basic Person Test | 16.3 | 20.2 | 7.8 | 10.6 | 12.1 | 15.4 |
Element Collection Test | 3.7 | 9.8 | 0.40 | 6.3 | 2.1 | 8.0 |
Inheritance Test | 15.9 | 17.0 | 9.5 | 12.2 | 12.7 | 14.6 |
Indexing Test | 6.5 | 19.0 | 10.7 | 16.9 | 8.6 | 18.0 |
Graph (Binary Tree) Test | 1.2 | 6.6 | 1.1 | 7.8 | 1.2 | 7.2 |
Multithreading Test | 32.6 | 24.1 | 16.0 | 13.5 | 24.3 | 18.8 |
All Tests | 13.1 | 16.5 | 7.8 | 11.3 | 10.5 | 13.9 |
The results above show that in general Hibernate with HSQLDB embedded is more efficient than EclipseLink 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 EclipseLink with PostgreSQL database server (0.40) to the normalized speed of Hibernate with HSQLDB embedded database (6.3) reveals that in that case, Hibernate with HSQLDB embedded is 15.7 times faster than EclipseLink with PostgreSQL server.
Other Head to Head DBMS/JPA Comparisons
EclipseLink 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
- 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 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