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 Test3.61001.61002.6100
Element Collection Test1.61000.721001.1100
Inheritance Test3.71001.61002.7100
Indexing Test5.41002.61004.0100
Graph (Binary Tree) Test1.588.41.21001.494.2
Multithreading Test7.41002.91005.2100
All Tests3.998.11.81002.899.0

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 (2.8) to the normalized speed of ObjectDB embedded database (99.0) reveals that in these tests, ObjectDB embedded is 35.4 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 (0.72) to the normalized speed of ObjectDB embedded database (100) reveals that in that case, ObjectDB embedded is 139 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 Test3.010011.01007.0100
Element Collection Test0.341001.21000.79100
Inheritance Test1.310014.51007.9100
Indexing Test2.510012.81007.6100
Graph (Binary Tree) Test0.551000.711000.63100
Multithreading Test0.2310013.81007.0100
All Tests1.31009.01005.2100

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 (5.2) to the normalized speed of ObjectDB embedded database (100) reveals that in these tests, ObjectDB embedded is 19.2 times faster than Hibernate with MySQL server.

A huge performance gap has been detected when using multithreading with small retrieval size. Comparing the normalized speed of Hibernate with MySQL database server (0.23) to the normalized speed of ObjectDB embedded database (100) reveals that in that case, ObjectDB embedded is 435 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 Test10.01002.01006.0100
Element Collection Test6.71000.531003.6100
Inheritance Test2.81001.61002.2100
Indexing Test0.441002.01001.2100
Multithreading Test2.11000.981001.5100
All Tests4.41001.41002.9100

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 (2.9) to the normalized speed of ObjectDB embedded database (100) reveals that in these tests, ObjectDB embedded is 34.5 times faster than Hibernate with MySQL server.

A huge performance gap has been detected when using database indexes with small retrieval size. Comparing the normalized speed of Hibernate with MySQL database server (0.44) to the normalized speed of ObjectDB embedded database (100) reveals that in that case, ObjectDB embedded is 227 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 Test0.731001.61001.2100
Element Collection Test0.391001.21000.78100
Inheritance Test0.611002.11001.4100
Indexing Test0.811002.61001.7100
Graph (Binary Tree) Test0.691000.401000.54100
Multithreading Test0.631003.01001.8100
All Tests0.641001.81001.2100

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 (1.2) to the normalized speed of ObjectDB embedded database (100) reveals that in these tests, ObjectDB embedded is 83.3 times faster than Hibernate with MySQL server.

A huge performance gap has been detected when using JPA element collections with small transaction size. Comparing the normalized speed of Hibernate with MySQL database server (0.39) to the normalized speed of ObjectDB embedded database (100) reveals that in that case, ObjectDB embedded is 256 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 Test1.11001.71001.4100
Element Collection Test0.211000.531000.37100
Inheritance Test0.651001.81001.2100
Indexing Test0.811002.01001.4100
Graph (Binary Tree) Test0.551000.621000.58100
Multithreading Test0.351004.11002.2100
All Tests0.611001.81001.2100

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 (1.2) to the normalized speed of ObjectDB embedded database (100) reveals that in these tests, ObjectDB embedded is 83.3 times faster than Hibernate with MySQL server.

A huge performance gap has been detected when using JPA element collections with small transaction size. Comparing the normalized speed of Hibernate with MySQL database server (0.21) to the normalized speed of ObjectDB embedded database (100) reveals that in that case, ObjectDB embedded is 476 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 Test3.71003.61003.6100
Element Collection Test1.81000.841001.3100
Inheritance Test1.81004.31003.1100
Indexing Test2.01004.41003.2100
Graph (Binary Tree) Test0.8397.10.731000.7898.5
Multithreading Test2.11005.01003.6100
All Tests2.199.63.21002.799.8

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 (2.7) to the normalized speed of ObjectDB embedded database (99.8) reveals that in these tests, ObjectDB embedded is 37.0 times faster than Hibernate with MySQL server.

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

Other Head to Head DBMS/JPA Comparisons