Compare with

Comparison of Hibernate with MySQL server vs ObjectDB 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
MySQL server
ObjectDB embeddedHibernate
MySQL server
ObjectDB embeddedHibernate
MySQL server
ObjectDB embedded
Basic Person Test4.61003.71004.1100
Element Collection Test2.51001.71002.1100
Inheritance Test4.41003.31003.8100
Indexing Test6.61004.670.05.685.0
Graph (Binary Tree) Test2.01002.21002.1100
Multithreading Test13.310010.877.512.188.7
All Tests5.61004.491.35.095.6

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

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
MySQL server
ObjectDB embeddedHibernate
MySQL server
ObjectDB embeddedHibernate
MySQL server
ObjectDB embedded
Basic Person Test5.110019.110012.1100
Element Collection Test1.81001.51001.7100
Inheritance Test5.210020.010012.6100
Indexing Test4.810019.110012.0100
Graph (Binary Tree) Test0.581000.571000.58100
Multithreading Test13.410032.410022.9100
All Tests5.110015.410010.3100

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

A huge performance gap has been detected when using graphs of objects with large retrieval size. Comparing the normalized speed of Hibernate with MySQL database server (0.57) to the normalized speed of ObjectDB embedded database (100) reveals that in that case, ObjectDB embedded is 175 times faster than Hibernate with MySQL server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
MySQL server
ObjectDB embeddedHibernate
MySQL server
ObjectDB embeddedHibernate
MySQL server
ObjectDB embedded
Basic Person Test24.999.46.710015.899.7
Element Collection Test26.21001.210013.7100
Inheritance Test21.61007.010014.3100
Indexing Test3.210013.51008.3100
Multithreading Test32.210014.110023.2100
All Tests21.699.98.510015.199.9

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

A huge performance gap has been detected when using JPA element collections with large retrieval size. Comparing the normalized speed of Hibernate with MySQL database server (1.2) to the normalized speed of ObjectDB embedded database (100) reveals that in that case, ObjectDB embedded is 83.3 times faster than Hibernate with MySQL server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
MySQL server
ObjectDB embeddedHibernate
MySQL server
ObjectDB embeddedHibernate
MySQL server
ObjectDB embedded
Basic Person Test4.51003.51004.0100
Element Collection Test3.11002.11002.6100
Inheritance Test1.41001.51001.5100
Indexing Test4.91004.11004.5100
Graph (Binary Tree) Test0.701000.621000.66100
Multithreading Test11.710011.210011.4100
All Tests4.41003.81004.1100

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

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
MySQL server
ObjectDB embeddedHibernate
MySQL server
ObjectDB embeddedHibernate
MySQL server
ObjectDB embedded
Basic Person Test3.21002.21002.7100
Element Collection Test1.51000.751001.1100
Inheritance Test3.21002.51002.8100
Indexing Test4.11002.91003.5100
Graph (Binary Tree) Test0.701000.711000.71100
Multithreading Test13.310028.610021.0100
All Tests4.31006.31005.3100

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

A huge performance gap has been detected when using graphs of objects with small transaction size. Comparing the normalized speed of Hibernate with MySQL database server (0.70) to the normalized speed of ObjectDB embedded database (100) reveals that in that case, ObjectDB embedded is 143 times faster than Hibernate with MySQL server.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 Hibernate
MySQL server
ObjectDB embeddedHibernate
MySQL server
ObjectDB embeddedHibernate
MySQL server
ObjectDB embedded
Basic Person Test8.599.97.01007.799.9
Element Collection Test7.01001.51004.2100
Inheritance Test7.11006.81007.0100
Indexing Test4.71008.894.06.897.0
Graph (Binary Tree) Test0.991001.01001.0100
Multithreading Test16.810019.495.518.197.7
All Tests7.7100.07.798.27.799.1

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

A huge performance gap has been detected when using graphs of objects with small transaction/retrieval size. Comparing the normalized speed of Hibernate with MySQL database server (0.99) to the normalized speed of ObjectDB embedded database (100) reveals that in that case, ObjectDB embedded is 101 times faster than Hibernate with MySQL server.

Other Head to Head DBMS/JPA Comparisons