Compare with

Comparison of Hibernate with H2 server vs ObjectDB 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
H2 server
ObjectDB serverHibernate
H2 server
ObjectDB serverHibernate
H2 server
ObjectDB server
Basic Person Test4.635.23.074.13.854.7
Element Collection Test3.738.21.157.82.448.0
Inheritance Test6.732.73.172.84.952.7
Indexing Test8.249.94.290.16.270.0
Graph (Binary Tree) Test3.41003.989.23.794.6
Multithreading Test6.876.65.099.45.988.0
All Tests5.655.43.480.64.568.0

The results above show that in general ObjectDB server is much more efficient than Hibernate with H2 server in persisting JPA entity objects to the database. Comparing the normalized speed of Hibernate with H2 database server (4.5) to the normalized speed of ObjectDB database server (68.0) reveals that in these tests, ObjectDB server is 15.1 times faster than Hibernate with H2 server.

A huge performance gap has been detected when using JPA element collections with large transaction size. Comparing the normalized speed of Hibernate with H2 database server (1.1) to the normalized speed of ObjectDB database server (57.8) reveals that in that case, ObjectDB server is 52.5 times faster than Hibernate with H2 server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
H2 server
ObjectDB serverHibernate
H2 server
ObjectDB serverHibernate
H2 server
ObjectDB server
Basic Person Test3.115.76.045.44.630.5
Element Collection Test1.019.91.149.21.034.6
Inheritance Test2.913.27.649.45.231.3
Indexing Test2.614.07.059.54.836.8
Graph (Binary Tree) Test0.4219.91.124.70.7822.3
Multithreading Test6.519.710.560.28.540.0
All Tests2.817.15.648.14.232.6

The results above show that in general ObjectDB server is much more efficient than Hibernate with H2 server in retrieving JPA entity objects from the database. Comparing the normalized speed of Hibernate with H2 database server (4.2) to the normalized speed of ObjectDB database server (32.6) reveals that in these tests, ObjectDB server is 7.8 times faster than Hibernate with H2 server.

A huge performance gap has been detected when using graphs of objects with small retrieval size. Comparing the normalized speed of Hibernate with H2 database server (0.42) to the normalized speed of ObjectDB database server (19.9) reveals that in that case, ObjectDB server is 47.4 times faster than Hibernate with H2 server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
H2 server
ObjectDB serverHibernate
H2 server
ObjectDB serverHibernate
H2 server
ObjectDB server
Basic Person Test3.738.81.025.92.332.4
Element Collection Test3.739.50.6333.12.236.3
Inheritance Test3.234.81.434.02.334.4
Indexing Test1.714.55.853.33.833.9
Multithreading Test1.150.80.8852.11.051.5
All Tests2.735.71.939.72.337.7

The results above show that in general ObjectDB server is much more efficient than Hibernate with H2 server in executing the tested JPA queries. Comparing the normalized speed of Hibernate with H2 database server (2.3) to the normalized speed of ObjectDB database server (37.7) reveals that in these tests, ObjectDB server is 16.4 times faster than Hibernate with H2 server.

A huge performance gap has been detected when using multithreading with large retrieval size. Comparing the normalized speed of Hibernate with H2 database server (0.88) to the normalized speed of ObjectDB database server (52.1) reveals that in that case, ObjectDB server is 59.2 times faster than Hibernate with H2 server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
H2 server
ObjectDB serverHibernate
H2 server
ObjectDB serverHibernate
H2 server
ObjectDB server
Basic Person Test2.918.31.840.92.429.6
Element Collection Test2.621.11.153.71.937.4
Inheritance Test3.219.92.551.92.935.9
Indexing Test2.917.92.752.12.835.0
Graph (Binary Tree) Test1.242.60.4324.10.7933.3
Multithreading Test5.668.62.468.74.068.6
All Tests3.131.41.848.62.540.0

The results above show that in general ObjectDB server is much more efficient than Hibernate with H2 server in updating JPA entity objects in the database. Comparing the normalized speed of Hibernate with H2 database server (2.5) to the normalized speed of ObjectDB database server (40.0) reveals that in these tests, ObjectDB server is 16.0 times faster than Hibernate with H2 server.

A huge performance gap has been detected when using graphs of objects with large transaction size. Comparing the normalized speed of Hibernate with H2 database server (0.43) to the normalized speed of ObjectDB database server (24.1) reveals that in that case, ObjectDB server is 56.0 times faster than Hibernate with H2 server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
H2 server
ObjectDB serverHibernate
H2 server
ObjectDB serverHibernate
H2 server
ObjectDB server
Basic Person Test3.820.22.467.73.144.0
Element Collection Test1.922.91.157.61.540.2
Inheritance Test3.723.12.561.63.142.3
Indexing Test7.634.93.155.95.345.4
Graph (Binary Tree) Test0.9919.30.9127.90.9523.6
Multithreading Test6.138.57.350.56.744.5
All Tests4.026.52.953.53.540.0

The results above show that in general ObjectDB server is much more efficient than Hibernate with H2 server in deleting JPA entity objects from the database. Comparing the normalized speed of Hibernate with H2 database server (3.5) to the normalized speed of ObjectDB database server (40.0) reveals that in these tests, ObjectDB server is 11.4 times faster than Hibernate with H2 server.

A huge performance gap has been detected when using JPA element collections with large transaction size. Comparing the normalized speed of Hibernate with H2 database server (1.1) to the normalized speed of ObjectDB database server (57.6) reveals that in that case, ObjectDB server is 52.4 times faster than Hibernate with H2 server.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 Hibernate
H2 server
ObjectDB serverHibernate
H2 server
ObjectDB serverHibernate
H2 server
ObjectDB server
Basic Person Test3.625.62.850.83.238.2
Element Collection Test2.628.31.050.31.839.3
Inheritance Test4.024.73.453.93.739.3
Indexing Test4.626.24.562.24.644.2
Graph (Binary Tree) Test1.545.41.641.51.643.5
Multithreading Test5.250.85.266.25.258.5
All Tests3.733.13.254.63.443.9

The results above show that in general ObjectDB server is much more efficient than Hibernate with H2 server in performing JPA database operations. Comparing the normalized speed of Hibernate with H2 database server (3.4) to the normalized speed of ObjectDB database server (43.9) reveals that in these tests, ObjectDB server is 12.9 times faster than Hibernate with H2 server.

A huge performance gap has been detected when using JPA element collections with large transaction/retrieval size. Comparing the normalized speed of Hibernate with H2 database server (1.0) to the normalized speed of ObjectDB database server (50.3) reveals that in that case, ObjectDB server is 50.3 times faster than Hibernate with H2 server.

Other Head to Head DBMS/JPA Comparisons