Compare with

Comparison of Hibernate with SQLite embedded vs EclipseLink with H2 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
 Hibernate
SQLite embedded
EclipseLink
H2 embedded
Hibernate
SQLite embedded
EclipseLink
H2 embedded
Hibernate
SQLite embedded
EclipseLink
H2 embedded
Basic Person Test0.08325.11.08.90.5517.0
Element Collection Test0.06720.40.698.00.3814.2
Inheritance Test0.08028.70.998.70.5418.7
Indexing Test0.09837.61.014.00.5525.8
Graph (Binary Tree) Test0.2717.70.9614.70.6116.2
Multithreading Testfailed30.3failed11.4failed20.8
All Tests0.1226.60.9310.90.5318.8

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
 Hibernate
SQLite embedded
EclipseLink
H2 embedded
Hibernate
SQLite embedded
EclipseLink
H2 embedded
Hibernate
SQLite embedded
EclipseLink
H2 embedded
Basic Person Test1.830.41.329.11.529.7
Element Collection Test0.000819.6failed27.60.000823.6
Inheritance Test2.433.81.439.81.936.8
Indexing Test1.922.22.341.32.131.8
Graph (Binary Tree) Test0.5616.00.8820.00.7218.0
Multithreading Testfailed33.7failed29.0failed31.4
All Tests1.325.91.531.11.428.5

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
 Hibernate
SQLite embedded
EclipseLink
H2 embedded
Hibernate
SQLite embedded
EclipseLink
H2 embedded
Hibernate
SQLite embedded
EclipseLink
H2 embedded
Basic Person Test1.14.40.221.40.652.9
Element Collection Test0.394.1failed2.40.393.2
Inheritance Test0.533.40.282.00.402.7
Indexing Test0.001113.00.4322.80.2117.9
Multithreading Testfailed1.0failed0.67failed0.85
All Tests0.505.20.315.90.425.5

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
 Hibernate
SQLite embedded
EclipseLink
H2 embedded
Hibernate
SQLite embedded
EclipseLink
H2 embedded
Hibernate
SQLite embedded
EclipseLink
H2 embedded
Basic Person Test0.07616.60.657.60.3712.1
Element Collection Test0.002215.3failed10.50.002212.9
Inheritance Test0.07915.70.979.80.5312.7
Indexing Test0.05712.10.549.90.3011.0
Graph (Binary Tree) Test0.2613.70.427.00.3410.3
Multithreading Testfailed20.9failed4.2failed12.6
All Tests0.09415.70.658.20.3412.0

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
 Hibernate
SQLite embedded
EclipseLink
H2 embedded
Hibernate
SQLite embedded
EclipseLink
H2 embedded
Hibernate
SQLite embedded
EclipseLink
H2 embedded
Basic Person Test0.06135.10.9119.60.4927.4
Element Collection Test0.000719.3failed8.50.000713.9
Inheritance Test0.05836.00.9014.00.4825.0
Indexing Test0.07942.50.5419.20.3130.9
Graph (Binary Tree) Test0.2412.20.8014.40.5213.3
Multithreading Testfailed54.4failed25.8failed40.1
All Tests0.08833.30.7916.90.4025.1

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
 Hibernate
SQLite embedded
EclipseLink
H2 embedded
Hibernate
SQLite embedded
EclipseLink
H2 embedded
Hibernate
SQLite embedded
EclipseLink
H2 embedded
Basic Person Test90.236.290.239.290.237.7
Element Collection Test82.033.382.034.982.034.1
Inheritance Test80.535.480.536.280.535.8
Indexing Test93.439.894.843.794.141.7
Graph (Binary Tree) Test67.941.050.928.459.434.7
Multithreading Testfailed48.7failed12.4failed30.6
All Tests82.839.179.732.581.235.8

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
 Hibernate
SQLite embedded
EclipseLink
H2 embedded
Hibernate
SQLite embedded
EclipseLink
H2 embedded
Hibernate
SQLite embedded
EclipseLink
H2 embedded
Basic Person Test0.6322.30.8113.30.7217.8
Element Collection Test0.09215.70.6911.40.1913.6
Inheritance Test0.6323.50.9114.90.7719.2
Indexing Test0.4225.50.9621.50.6923.5
Graph (Binary Tree) Test0.3314.90.7714.00.5514.5
Multithreading Testfailed28.1failed14.2failed21.1
All Tests0.4221.90.8614.90.6218.4

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