Compare with

Comparison of ObjectDB embedded vs Hibernate with MySQL 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
 ObjectDB embeddedHibernate
MySQL server
ObjectDB embeddedHibernate
MySQL server
ObjectDB embeddedHibernate
MySQL server
Basic Person Test1003.61001.61002.6
Element Collection Test1001.61000.721001.1
Inheritance Test1003.71001.61002.7
Indexing Test1005.41002.61004.0
Graph (Binary Tree) Test88.41.51001.294.21.4
Multithreading Test1007.41002.91005.2
All Tests98.13.91001.899.02.8

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
 ObjectDB embeddedHibernate
MySQL server
ObjectDB embeddedHibernate
MySQL server
ObjectDB embeddedHibernate
MySQL server
Basic Person Test1003.010011.01007.0
Element Collection Test1000.341001.21000.79
Inheritance Test1001.310014.51007.9
Indexing Test1002.510012.81007.6
Graph (Binary Tree) Test1000.551000.711000.63
Multithreading Test1000.2310013.81007.0
All Tests1001.31009.01005.2

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
 ObjectDB embeddedHibernate
MySQL server
ObjectDB embeddedHibernate
MySQL server
ObjectDB embeddedHibernate
MySQL server
Basic Person Test10010.01002.01006.0
Element Collection Test1006.71000.531003.6
Inheritance Test1002.81001.61002.2
Indexing Test1000.441002.01001.2
Multithreading Test1002.11000.981001.5
All Tests1004.41001.41002.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 (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
 ObjectDB embeddedHibernate
MySQL server
ObjectDB embeddedHibernate
MySQL server
ObjectDB embeddedHibernate
MySQL server
Basic Person Test1000.731001.61001.2
Element Collection Test1000.391001.21000.78
Inheritance Test1000.611002.11001.4
Indexing Test1000.811002.61001.7
Graph (Binary Tree) Test1000.691000.401000.54
Multithreading Test1000.631003.01001.8
All Tests1000.641001.81001.2

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
 ObjectDB embeddedHibernate
MySQL server
ObjectDB embeddedHibernate
MySQL server
ObjectDB embeddedHibernate
MySQL server
Basic Person Test1001.11001.71001.4
Element Collection Test1000.211000.531000.37
Inheritance Test1000.651001.81001.2
Indexing Test1000.811002.01001.4
Graph (Binary Tree) Test1000.551000.621000.58
Multithreading Test1000.351004.11002.2
All Tests1000.611001.81001.2

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
 ObjectDB embeddedHibernate
MySQL server
ObjectDB embeddedHibernate
MySQL server
ObjectDB embeddedHibernate
MySQL server
Basic Person Test1003.71003.61003.6
Element Collection Test1001.81000.841001.3
Inheritance Test1001.81004.31003.1
Indexing Test1002.01004.41003.2
Graph (Binary Tree) Test97.10.831000.7398.50.78
Multithreading Test1002.11005.01003.6
All Tests99.62.11003.299.82.7

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