Compare with

Comparison of Hibernate with SQLite embedded vs EclipseLink with H2 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 EntitiesMany EntitiesAverage Score
 Hibernate
SQLite embedded
EclipseLink
H2 server
Hibernate
SQLite embedded
EclipseLink
H2 server
Hibernate
SQLite embedded
EclipseLink
H2 server
Basic Person Test0.0835.61.02.50.554.0
Element Collection Test0.0674.20.691.50.382.8
Inheritance Test0.0806.60.992.10.544.4
Indexing Test0.0989.71.04.10.556.9
Graph (Binary Tree) Test0.274.70.963.50.614.1
Multithreading Testfailed10.2failed4.0failed7.1
All Tests0.126.80.932.90.534.9

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

The results above show that in general EclipseLink with H2 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 H2 database server (4.9) reveals that in these tests, EclipseLink with H2 server is 9.2 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 database server (9.7) reveals that in that case, EclipseLink with H2 server is 99.0 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 server
Hibernate
SQLite embedded
EclipseLink
H2 server
Hibernate
SQLite embedded
EclipseLink
H2 server
Basic Person Test1.85.51.38.21.56.8
Element Collection Test0.00083.2failed4.20.00083.7
Inheritance Test2.44.71.410.11.97.4
Indexing Test1.94.42.39.42.16.9
Graph (Binary Tree) Test0.561.10.881.90.721.5
Multithreading Testfailed12.2failed15.9failed14.0
All Tests1.35.21.58.31.46.7

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

The results above show that in general EclipseLink with H2 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 H2 database server (6.7) reveals that in these tests, EclipseLink with H2 server is 4.8 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 database server (3.2) reveals that in that case, EclipseLink with H2 server is 4,000 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 server
Hibernate
SQLite embedded
EclipseLink
H2 server
Hibernate
SQLite embedded
EclipseLink
H2 server
Basic Person Test1.13.80.221.10.652.5
Element Collection Test0.394.1failed1.10.392.6
Inheritance Test0.533.20.281.30.402.3
Indexing Test0.00113.00.438.00.215.5
Multithreading Testfailed1.1failed1.0failed1.1
All Tests0.503.00.312.50.422.8

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

The results above show that in general EclipseLink with H2 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 H2 database server (2.8) reveals that in these tests, EclipseLink with H2 server is 6.7 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 database server (3.0) reveals that in that case, EclipseLink with H2 server is 2,727 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 server
Hibernate
SQLite embedded
EclipseLink
H2 server
Hibernate
SQLite embedded
EclipseLink
H2 server
Basic Person Test0.0764.50.652.20.373.4
Element Collection Test0.00223.8failed2.40.00223.1
Inheritance Test0.0794.40.973.00.533.7
Indexing Test0.0574.20.543.10.303.7
Graph (Binary Tree) Test0.261.40.420.790.341.1
Multithreading Testfailed7.8failed2.5failed5.1
All Tests0.0944.30.652.30.343.3

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

The results above show that in general EclipseLink with H2 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 H2 database server (3.3) reveals that in these tests, EclipseLink with H2 server is 9.7 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 database server (3.8) reveals that in that case, EclipseLink with H2 server is 1,727 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 server
Hibernate
SQLite embedded
EclipseLink
H2 server
Hibernate
SQLite embedded
EclipseLink
H2 server
Basic Person Test0.0616.40.913.10.494.8
Element Collection Test0.00073.0failed1.30.00072.2
Inheritance Test0.0585.60.902.80.484.2
Indexing Test0.07910.30.543.80.317.0
Graph (Binary Tree) Test0.241.50.801.30.521.4
Multithreading Testfailed7.0failed4.9failed6.0
All Tests0.0885.60.792.90.404.3

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

The results above show that in general EclipseLink with H2 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 H2 database server (4.3) reveals that in these tests, EclipseLink with H2 server is 10.7 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 database server (3.0) reveals that in that case, EclipseLink with H2 server is 4,286 times faster than Hibernate with SQLite embedded.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 Hibernate
SQLite embedded
EclipseLink
H2 server
Hibernate
SQLite embedded
EclipseLink
H2 server
Hibernate
SQLite embedded
EclipseLink
H2 server
Basic Person Test0.635.20.813.40.724.3
Element Collection Test0.0923.60.692.10.192.9
Inheritance Test0.634.90.913.90.774.4
Indexing Test0.426.30.965.70.696.0
Graph (Binary Tree) Test0.332.10.771.90.552.0
Multithreading Testfailed7.7failed5.7failed6.7
All Tests0.425.10.863.80.624.5

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

Other Head to Head DBMS/JPA Comparisons