Compare with

Comparison of EclipseLink with PostgreSQL server 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 EntitiesMany EntitiesAverage Score
 EclipseLink
PostgreSQL server
Hibernate
SQLite embedded
EclipseLink
PostgreSQL server
Hibernate
SQLite embedded
EclipseLink
PostgreSQL server
Hibernate
SQLite embedded
Basic Person Test7.30.0834.21.05.80.55
Element Collection Test3.10.0671.90.692.50.38
Inheritance Test6.90.0805.00.995.90.54
Indexing Test10.00.0986.81.08.40.55
Graph (Binary Tree) Test3.50.273.30.963.40.61
Multithreading Test31.8failed14.5failed23.1failed
All Tests10.40.126.00.938.20.53

Hibernate with SQLite embedded has failed in 2 tests (see exceptions).

The results above show that in general EclipseLink with PostgreSQL server 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 EclipseLink with PostgreSQL database server (8.2) reveals that in these tests, EclipseLink with PostgreSQL server is 15.5 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 EclipseLink with PostgreSQL database server (10.0) reveals that in that case, EclipseLink with PostgreSQL server is 102 times faster than Hibernate with SQLite embedded.

Speed comparison of JPA database retrieval operations (normalized score, higher is better)

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
PostgreSQL server
Hibernate
SQLite embedded
EclipseLink
PostgreSQL server
Hibernate
SQLite embedded
EclipseLink
PostgreSQL server
Hibernate
SQLite embedded
Basic Person Test6.81.817.21.312.01.5
Element Collection Test0.0260.00080.020failed0.0230.0008
Inheritance Test6.02.419.71.412.91.9
Indexing Test5.61.919.52.312.62.1
Graph (Binary Tree) Test0.470.560.610.880.540.72
Multithreading Test13.5failed27.8failed20.6failed
All Tests5.41.314.11.59.81.4

Hibernate with SQLite embedded has failed in 3 tests (see exceptions).

The results above show that in general EclipseLink with PostgreSQL server 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 EclipseLink with PostgreSQL database server (9.8) reveals that in these tests, EclipseLink with PostgreSQL server is 7.0 times faster than Hibernate with SQLite embedded.

A huge performance gap has been detected when using JPA element collections with small retrieval size. Comparing the normalized speed of Hibernate with SQLite embedded database (0.0008) to the normalized speed of EclipseLink with PostgreSQL database server (0.026) reveals that in that case, EclipseLink with PostgreSQL server is 32.5 times faster than Hibernate with SQLite embedded.

Speed comparison of JPA database query operations (normalized score, higher is better)

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
PostgreSQL server
Hibernate
SQLite embedded
EclipseLink
PostgreSQL server
Hibernate
SQLite embedded
EclipseLink
PostgreSQL server
Hibernate
SQLite embedded
Basic Person Test55.51.17.80.2231.60.65
Element Collection Test15.40.390.028failed7.70.39
Inheritance Test54.90.5311.50.2833.20.40
Indexing Test0.0770.001110.00.435.10.21
Multithreading Test55.3failed12.0failed33.7failed
All Tests36.20.508.30.3122.30.42

Hibernate with SQLite embedded has failed in 3 tests (see exceptions).

The results above show that in general EclipseLink with PostgreSQL server 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 EclipseLink with PostgreSQL database server (22.3) reveals that in these tests, EclipseLink with PostgreSQL server is 53.1 times faster than Hibernate with SQLite embedded.

A huge performance gap has been detected when using class inheritance in the object model with small retrieval size. Comparing the normalized speed of Hibernate with SQLite embedded database (0.53) to the normalized speed of EclipseLink with PostgreSQL database server (54.9) reveals that in that case, EclipseLink with PostgreSQL server is 104 times faster than Hibernate with SQLite embedded.

Speed comparison of JPA database update operations (normalized score, higher is better)

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
PostgreSQL server
Hibernate
SQLite embedded
EclipseLink
PostgreSQL server
Hibernate
SQLite embedded
EclipseLink
PostgreSQL server
Hibernate
SQLite embedded
Basic Person Test6.20.0764.10.655.10.37
Element Collection Test0.0800.00220.028failed0.0540.0022
Inheritance Test6.40.0796.10.976.20.53
Indexing Test6.50.0577.00.546.80.30
Graph (Binary Tree) Test0.900.260.500.420.700.34
Multithreading Test36.0failed9.1failed22.5failed
All Tests9.30.0944.50.656.90.34

Hibernate with SQLite embedded has failed in 3 tests (see exceptions).

The results above show that in general EclipseLink with PostgreSQL server 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 EclipseLink with PostgreSQL database server (6.9) reveals that in these tests, EclipseLink with PostgreSQL server is 20.3 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 EclipseLink with PostgreSQL database server (6.5) reveals that in that case, EclipseLink with PostgreSQL server is 114 times faster than Hibernate with SQLite embedded.

Speed comparison of JPA database removal operations (normalized score, higher is better)

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
PostgreSQL server
Hibernate
SQLite embedded
EclipseLink
PostgreSQL server
Hibernate
SQLite embedded
EclipseLink
PostgreSQL server
Hibernate
SQLite embedded
Basic Person Test5.70.0615.70.915.70.49
Element Collection Test0.0250.0007stoppedfailed0.0120.0007
Inheritance Test5.50.0585.40.905.40.48
Indexing Test10.40.07910.00.5410.20.31
Graph (Binary Tree) Test0.0160.240.0130.800.0150.52
Multithreading Test26.3failed16.8failed21.6failed
All Tests8.00.0886.30.797.20.40

Hibernate with SQLite embedded has failed in 3 tests (see exceptions).

The results above show that in general EclipseLink with PostgreSQL server 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 EclipseLink with PostgreSQL database server (7.2) reveals that in these tests, EclipseLink with PostgreSQL server is 18.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 EclipseLink with PostgreSQL database server (10.4) reveals that in that case, EclipseLink with PostgreSQL server is 132 times faster than Hibernate with SQLite embedded.

On the other hand, EclipseLink with PostgreSQL server is slower, for instance, 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 SQLite embedded database (0.80) reveals that in that case, EclipseLink with PostgreSQL server is 61.5 times slower than Hibernate with SQLite embedded.

Comparison of JPA/Database speed - the averages (normalized score, higher is better)

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 EclipseLink
PostgreSQL server
Hibernate
SQLite embedded
EclipseLink
PostgreSQL server
Hibernate
SQLite embedded
EclipseLink
PostgreSQL server
Hibernate
SQLite embedded
Basic Person Test16.30.637.80.8112.10.72
Element Collection Test3.70.0920.400.692.10.19
Inheritance Test15.90.639.50.9112.70.77
Indexing Test6.50.4210.70.968.60.69
Graph (Binary Tree) Test1.20.331.10.771.20.55
Multithreading Test32.6failed16.0failed24.3failed
All Tests13.10.427.80.8610.50.62

The results above show that in general EclipseLink with PostgreSQL server 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 EclipseLink with PostgreSQL database server (10.5) reveals that in these tests, EclipseLink with PostgreSQL server is 16.9 times faster than Hibernate with SQLite embedded.

A huge performance gap has been detected when using JPA element collections with small transaction/retrieval size. Comparing the normalized speed of Hibernate with SQLite embedded database (0.092) to the normalized speed of EclipseLink with PostgreSQL database server (3.7) reveals that in that case, EclipseLink with PostgreSQL server is 40.2 times faster than Hibernate with SQLite embedded.

Other Head to Head DBMS/JPA Comparisons