Compare with

Comparison of EclipseLink with H2 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 EntitiesMany EntitiesAverage Score
 EclipseLink
H2 embedded
Hibernate
SQLite embedded
EclipseLink
H2 embedded
Hibernate
SQLite embedded
EclipseLink
H2 embedded
Hibernate
SQLite embedded
Basic Person Test25.10.0838.91.017.00.55
Element Collection Test20.40.0678.00.6914.20.38
Inheritance Test28.70.0808.70.9918.70.54
Indexing Test37.60.09814.01.025.80.55
Graph (Binary Tree) Test17.70.2714.70.9616.20.61
Multithreading Test30.3failed11.4failed20.8failed
All Tests26.60.1210.90.9318.80.53

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

The results above show that in general EclipseLink with H2 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 EclipseLink with H2 embedded database (18.8) reveals that in these tests, EclipseLink with H2 embedded is 35.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 H2 embedded database (37.6) reveals that in that case, EclipseLink with H2 embedded is 384 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
H2 embedded
Hibernate
SQLite embedded
EclipseLink
H2 embedded
Hibernate
SQLite embedded
EclipseLink
H2 embedded
Hibernate
SQLite embedded
Basic Person Test30.41.829.11.329.71.5
Element Collection Test19.60.000827.6failed23.60.0008
Inheritance Test33.82.439.81.436.81.9
Indexing Test22.21.941.32.331.82.1
Graph (Binary Tree) Test16.00.5620.00.8818.00.72
Multithreading Test33.7failed29.0failed31.4failed
All Tests25.91.331.11.528.51.4

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

The results above show that in general EclipseLink with H2 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 EclipseLink with H2 embedded database (28.5) reveals that in these tests, EclipseLink with H2 embedded is 20.4 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 H2 embedded database (19.6) reveals that in that case, EclipseLink with H2 embedded is 24,500 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
H2 embedded
Hibernate
SQLite embedded
EclipseLink
H2 embedded
Hibernate
SQLite embedded
EclipseLink
H2 embedded
Hibernate
SQLite embedded
Basic Person Test4.41.11.40.222.90.65
Element Collection Test4.10.392.4failed3.20.39
Inheritance Test3.40.532.00.282.70.40
Indexing Test13.00.001122.80.4317.90.21
Multithreading Test1.0failed0.67failed0.85failed
All Tests5.20.505.90.315.50.42

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

The results above show that in general EclipseLink with H2 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 EclipseLink with H2 embedded database (5.5) reveals that in these tests, EclipseLink with H2 embedded is 13.1 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 EclipseLink with H2 embedded database (13.0) reveals that in that case, EclipseLink with H2 embedded is 11,818 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
H2 embedded
Hibernate
SQLite embedded
EclipseLink
H2 embedded
Hibernate
SQLite embedded
EclipseLink
H2 embedded
Hibernate
SQLite embedded
Basic Person Test16.60.0767.60.6512.10.37
Element Collection Test15.30.002210.5failed12.90.0022
Inheritance Test15.70.0799.80.9712.70.53
Indexing Test12.10.0579.90.5411.00.30
Graph (Binary Tree) Test13.70.267.00.4210.30.34
Multithreading Test20.9failed4.2failed12.6failed
All Tests15.70.0948.20.6512.00.34

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

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

A huge performance gap has been detected when using JPA element collections with small transaction size. Comparing the normalized speed of Hibernate with SQLite embedded database (0.0022) to the normalized speed of EclipseLink with H2 embedded database (15.3) reveals that in that case, EclipseLink with H2 embedded is 6,955 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
H2 embedded
Hibernate
SQLite embedded
EclipseLink
H2 embedded
Hibernate
SQLite embedded
EclipseLink
H2 embedded
Hibernate
SQLite embedded
Basic Person Test35.10.06119.60.9127.40.49
Element Collection Test19.30.00078.5failed13.90.0007
Inheritance Test36.00.05814.00.9025.00.48
Indexing Test42.50.07919.20.5430.90.31
Graph (Binary Tree) Test12.20.2414.40.8013.30.52
Multithreading Test54.4failed25.8failed40.1failed
All Tests33.30.08816.90.7925.10.40

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

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

A huge performance gap has been detected when using JPA element collections with small transaction size. Comparing the normalized speed of Hibernate with SQLite embedded database (0.0007) to the normalized speed of EclipseLink with H2 embedded database (19.3) reveals that in that case, EclipseLink with H2 embedded is 27,571 times faster than Hibernate with SQLite embedded.

Comparison of database storage efficiency (normalized score, higher is better)

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
H2 embedded
Hibernate
SQLite embedded
EclipseLink
H2 embedded
Hibernate
SQLite embedded
EclipseLink
H2 embedded
Hibernate
SQLite embedded
Basic Person Test36.290.239.290.237.790.2
Element Collection Test33.382.034.982.034.182.0
Inheritance Test35.480.536.280.535.880.5
Indexing Test39.893.443.794.841.794.1
Graph (Binary Tree) Test41.067.928.450.934.759.4
Multithreading Test48.7failed12.4failed30.6failed
All Tests39.182.832.579.735.881.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 EclipseLink with H2 embedded in using disk space. Comparing the normalized score of EclipseLink with H2 embedded database (35.8) to the normalized score of Hibernate with SQLite embedded database (81.2) reveals that in these tests, Hibernate with SQLite embedded is 2.3 times more efficient than EclipseLink with H2 embedded.

A large gap has been detected when using simple basic entities with small transaction size. Comparing the normalized score of EclipseLink with H2 embedded database (36.2) to the normalized score of Hibernate with SQLite embedded database (90.2) reveals that in that case, Hibernate with SQLite embedded is 2.5 times more efficient than EclipseLink with H2 embedded.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 EclipseLink
H2 embedded
Hibernate
SQLite embedded
EclipseLink
H2 embedded
Hibernate
SQLite embedded
EclipseLink
H2 embedded
Hibernate
SQLite embedded
Basic Person Test22.30.6313.30.8117.80.72
Element Collection Test15.70.09211.40.6913.60.19
Inheritance Test23.50.6314.90.9119.20.77
Indexing Test25.50.4221.50.9623.50.69
Graph (Binary Tree) Test14.90.3314.00.7714.50.55
Multithreading Test28.1failed14.2failed21.1failed
All Tests21.90.4214.90.8618.40.62

The results above show that in general EclipseLink with H2 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 EclipseLink with H2 embedded database (18.4) reveals that in these tests, EclipseLink with H2 embedded is 29.7 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 H2 embedded database (15.7) reveals that in that case, EclipseLink with H2 embedded is 171 times faster than Hibernate with SQLite embedded.

Other Head to Head DBMS/JPA Comparisons