Compare with

Comparison of EclipseLink with H2 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
H2 server
Hibernate
SQLite embedded
EclipseLink
H2 server
Hibernate
SQLite embedded
EclipseLink
H2 server
Hibernate
SQLite embedded
Basic Person Test5.60.0832.51.04.00.55
Element Collection Test4.20.0671.50.692.80.38
Inheritance Test6.60.0802.10.994.40.54
Indexing Test9.70.0984.11.06.90.55
Graph (Binary Tree) Test4.70.273.50.964.10.61
Multithreading Test10.2failed4.0failed7.1failed
All Tests6.80.122.90.934.90.53

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
 EclipseLink
H2 server
Hibernate
SQLite embedded
EclipseLink
H2 server
Hibernate
SQLite embedded
EclipseLink
H2 server
Hibernate
SQLite embedded
Basic Person Test5.51.88.21.36.81.5
Element Collection Test3.20.00084.2failed3.70.0008
Inheritance Test4.72.410.11.47.41.9
Indexing Test4.41.99.42.36.92.1
Graph (Binary Tree) Test1.10.561.90.881.50.72
Multithreading Test12.2failed15.9failed14.0failed
All Tests5.21.38.31.56.71.4

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
 EclipseLink
H2 server
Hibernate
SQLite embedded
EclipseLink
H2 server
Hibernate
SQLite embedded
EclipseLink
H2 server
Hibernate
SQLite embedded
Basic Person Test3.81.11.10.222.50.65
Element Collection Test4.10.391.1failed2.60.39
Inheritance Test3.20.531.30.282.30.40
Indexing Test3.00.00118.00.435.50.21
Multithreading Test1.1failed1.0failed1.1failed
All Tests3.00.502.50.312.80.42

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
 EclipseLink
H2 server
Hibernate
SQLite embedded
EclipseLink
H2 server
Hibernate
SQLite embedded
EclipseLink
H2 server
Hibernate
SQLite embedded
Basic Person Test4.50.0762.20.653.40.37
Element Collection Test3.80.00222.4failed3.10.0022
Inheritance Test4.40.0793.00.973.70.53
Indexing Test4.20.0573.10.543.70.30
Graph (Binary Tree) Test1.40.260.790.421.10.34
Multithreading Test7.8failed2.5failed5.1failed
All Tests4.30.0942.30.653.30.34

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
 EclipseLink
H2 server
Hibernate
SQLite embedded
EclipseLink
H2 server
Hibernate
SQLite embedded
EclipseLink
H2 server
Hibernate
SQLite embedded
Basic Person Test6.40.0613.10.914.80.49
Element Collection Test3.00.00071.3failed2.20.0007
Inheritance Test5.60.0582.80.904.20.48
Indexing Test10.30.0793.80.547.00.31
Graph (Binary Tree) Test1.50.241.30.801.40.52
Multithreading Test7.0failed4.9failed6.0failed
All Tests5.60.0882.90.794.30.40

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
 EclipseLink
H2 server
Hibernate
SQLite embedded
EclipseLink
H2 server
Hibernate
SQLite embedded
EclipseLink
H2 server
Hibernate
SQLite embedded
Basic Person Test5.20.633.40.814.30.72
Element Collection Test3.60.0922.10.692.90.19
Inheritance Test4.90.633.90.914.40.77
Indexing Test6.30.425.70.966.00.69
Graph (Binary Tree) Test2.10.331.90.772.00.55
Multithreading Test7.7failed5.7failed6.7failed
All Tests5.10.423.80.864.50.62

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