Compare with

Comparison of EclipseLink with HSQLDB 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
 EclipseLink
HSQLDB embedded
EclipseLink
H2 server
EclipseLink
HSQLDB embedded
EclipseLink
H2 server
EclipseLink
HSQLDB embedded
EclipseLink
H2 server
Basic Person Test27.15.617.22.522.24.0
Element Collection Test17.24.28.21.512.72.8
Inheritance Test26.76.611.92.119.34.4
Indexing Test30.69.718.64.124.66.9
Graph (Binary Tree) Test20.04.715.93.518.04.1
Multithreading Test32.510.211.44.022.07.1
All Tests25.76.813.92.919.84.9

The results above show that in general EclipseLink with HSQLDB embedded is much more efficient than EclipseLink with H2 server in persisting JPA entity objects to the database. Comparing the normalized speed of EclipseLink with H2 database server (4.9) to the normalized speed of EclipseLink with HSQLDB embedded database (19.8) reveals that in these tests, EclipseLink with HSQLDB embedded is 4.0 times faster than EclipseLink with H2 server.

A large performance gap has been detected when using simple basic entities with large transaction size. Comparing the normalized speed of EclipseLink with H2 database server (2.5) to the normalized speed of EclipseLink with HSQLDB embedded database (17.2) reveals that in that case, EclipseLink with HSQLDB embedded is 6.9 times faster than EclipseLink with H2 server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
HSQLDB embedded
EclipseLink
H2 server
EclipseLink
HSQLDB embedded
EclipseLink
H2 server
EclipseLink
HSQLDB embedded
EclipseLink
H2 server
Basic Person Test24.45.536.08.230.26.8
Element Collection Test14.93.219.14.217.03.7
Inheritance Test22.84.740.010.131.47.4
Indexing Test20.74.438.79.429.76.9
Graph (Binary Tree) Test8.71.114.21.911.41.5
Multithreading Test24.212.228.015.926.114.0
All Tests19.35.229.38.324.36.7

The results above show that in general EclipseLink with HSQLDB embedded is much more efficient than EclipseLink with H2 server in retrieving JPA entity objects from the database. Comparing the normalized speed of EclipseLink with H2 database server (6.7) to the normalized speed of EclipseLink with HSQLDB embedded database (24.3) reveals that in these tests, EclipseLink with HSQLDB embedded is 3.6 times faster than EclipseLink with H2 server.

A large performance gap has been detected when using graphs of objects with small retrieval size. Comparing the normalized speed of EclipseLink with H2 database server (1.1) to the normalized speed of EclipseLink with HSQLDB embedded database (8.7) reveals that in that case, EclipseLink with HSQLDB embedded is 7.9 times faster than EclipseLink with H2 server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
HSQLDB embedded
EclipseLink
H2 server
EclipseLink
HSQLDB embedded
EclipseLink
H2 server
EclipseLink
HSQLDB embedded
EclipseLink
H2 server
Basic Person Test2.93.80.881.11.92.5
Element Collection Test3.24.11.41.12.32.6
Inheritance Test2.63.21.11.31.92.3
Indexing Test21.53.033.38.027.45.5
Multithreading Test1.11.10.521.00.821.1
All Tests6.33.07.42.56.92.8

The results above show that in general EclipseLink with HSQLDB embedded is more efficient than EclipseLink with H2 server in executing the tested JPA queries. Comparing the normalized speed of EclipseLink with H2 database server (2.8) to the normalized speed of EclipseLink with HSQLDB embedded database (6.9) reveals that in these tests, EclipseLink with HSQLDB embedded is 2.5 times faster than EclipseLink with H2 server.

A large performance gap has been detected when using database indexes with small retrieval size. Comparing the normalized speed of EclipseLink with H2 database server (3.0) to the normalized speed of EclipseLink with HSQLDB embedded database (21.5) reveals that in that case, EclipseLink with HSQLDB embedded is 7.2 times faster than EclipseLink with H2 server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
HSQLDB embedded
EclipseLink
H2 server
EclipseLink
HSQLDB embedded
EclipseLink
H2 server
EclipseLink
HSQLDB embedded
EclipseLink
H2 server
Basic Person Test17.94.57.02.212.53.4
Element Collection Test14.63.88.32.411.43.1
Inheritance Test16.24.49.73.013.03.7
Indexing Test12.04.26.83.19.43.7
Graph (Binary Tree) Test4.71.43.40.794.01.1
Multithreading Test24.47.84.42.514.45.1
All Tests15.04.36.62.310.83.3

The results above show that in general EclipseLink with HSQLDB embedded is much more efficient than EclipseLink with H2 server in updating JPA entity objects in the database. Comparing the normalized speed of EclipseLink with H2 database server (3.3) to the normalized speed of EclipseLink with HSQLDB embedded database (10.8) reveals that in these tests, EclipseLink with HSQLDB embedded is 3.3 times faster than EclipseLink with H2 server.

A large performance gap has been detected when using graphs of objects with large transaction size. Comparing the normalized speed of EclipseLink with H2 database server (0.79) to the normalized speed of EclipseLink with HSQLDB embedded database (3.4) reveals that in that case, EclipseLink with HSQLDB embedded is 4.3 times faster than EclipseLink with H2 server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
HSQLDB embedded
EclipseLink
H2 server
EclipseLink
HSQLDB embedded
EclipseLink
H2 server
EclipseLink
HSQLDB embedded
EclipseLink
H2 server
Basic Person Test32.36.420.33.126.34.8
Element Collection Test14.33.06.01.310.22.2
Inheritance Test29.25.623.92.826.64.2
Indexing Test55.310.327.13.841.27.0
Graph (Binary Tree) Test6.81.514.11.310.41.4
Multithreading Test52.97.028.44.940.66.0
All Tests31.85.620.02.925.94.3

The results above show that in general EclipseLink with HSQLDB embedded is much more efficient than EclipseLink with H2 server in deleting JPA entity objects from the database. Comparing the normalized speed of EclipseLink with H2 database server (4.3) to the normalized speed of EclipseLink with HSQLDB embedded database (25.9) reveals that in these tests, EclipseLink with HSQLDB embedded is 6.0 times faster than EclipseLink with H2 server.

A huge performance gap has been detected when using graphs of objects with large transaction size. Comparing the normalized speed of EclipseLink with H2 database server (1.3) to the normalized speed of EclipseLink with HSQLDB embedded database (14.1) reveals that in that case, EclipseLink with HSQLDB embedded is 10.8 times faster than EclipseLink with H2 server.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 EclipseLink
HSQLDB embedded
EclipseLink
H2 server
EclipseLink
HSQLDB embedded
EclipseLink
H2 server
EclipseLink
HSQLDB embedded
EclipseLink
H2 server
Basic Person Test20.95.216.33.418.64.3
Element Collection Test12.83.68.62.110.72.9
Inheritance Test19.54.917.33.918.44.4
Indexing Test28.06.324.95.726.56.0
Graph (Binary Tree) Test10.02.111.91.911.02.0
Multithreading Test27.07.714.65.720.86.7
All Tests20.15.115.73.817.94.5

The results above show that in general EclipseLink with HSQLDB embedded is much more efficient than EclipseLink with H2 server in performing JPA database operations. Comparing the normalized speed of EclipseLink with H2 database server (4.5) to the normalized speed of EclipseLink with HSQLDB embedded database (17.9) reveals that in these tests, EclipseLink with HSQLDB embedded is 4.0 times faster than EclipseLink with H2 server.

A large performance gap has been detected when using graphs of objects with large transaction/retrieval size. Comparing the normalized speed of EclipseLink with H2 database server (1.9) to the normalized speed of EclipseLink with HSQLDB embedded database (11.9) reveals that in that case, EclipseLink with HSQLDB embedded is 6.3 times faster than EclipseLink with H2 server.

Other Head to Head DBMS/JPA Comparisons