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.81002.71003.2100
Element Collection Test2.51001.587.42.093.7
Inheritance Test3.91002.81003.3100
Indexing Test6.01003.782.54.991.3
Graph (Binary Tree) Test1.61001.999.21.799.6
Multithreading Test12.11008.371.410.285.7
All Tests5.01003.590.14.295.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 (4.2) to the normalized speed of ObjectDB embedded database (95.0) reveals that in these tests, ObjectDB embedded is 22.6 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 (1.6) to the normalized speed of ObjectDB embedded database (100) reveals that in that case, ObjectDB embedded is 62.5 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 Test6.210017.710011.9100
Element Collection Test1.81001.41001.6100
Inheritance Test6.710018.810012.7100
Indexing Test6.310017.610011.9100
Graph (Binary Tree) Test1.01000.951001.0100
Multithreading Test15.210029.310022.2100
All Tests6.210014.310010.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 (10.2) to the normalized speed of ObjectDB embedded database (100) reveals that in these tests, ObjectDB embedded is 9.8 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.95) to the normalized speed of ObjectDB embedded database (100) reveals that in that case, ObjectDB embedded is 105 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 Test7.298.52.61004.999.3
Element Collection Test7.997.60.941004.498.8
Inheritance Test7.01002.71004.8100
Indexing Test4.610013.21008.9100
Multithreading Test10.293.56.51008.396.8
All Tests7.497.95.21006.399.0

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 (6.3) to the normalized speed of ObjectDB embedded database (99.0) reveals that in these tests, ObjectDB embedded is 15.7 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 (0.94) to the normalized speed of ObjectDB embedded database (100) reveals that in that case, ObjectDB embedded is 106 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.31003.01003.6100
Element Collection Test2.61001.81002.2100
Inheritance Test1.41001.31001.3100
Indexing Test4.01003.21003.6100
Graph (Binary Tree) Test0.861000.781000.82100
Multithreading Test9.31009.41009.3100
All Tests3.71003.21003.5100

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 (3.5) to the normalized speed of ObjectDB embedded database (100) reveals that in these tests, ObjectDB embedded is 28.6 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.78) to the normalized speed of ObjectDB embedded database (100) reveals that in that case, ObjectDB embedded is 128 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 Test2.51002.21002.3100
Element Collection Test1.31000.671001.0100
Inheritance Test2.91002.41002.6100
Indexing Test3.71003.21003.5100
Graph (Binary Tree) Test0.851000.731000.79100
Multithreading Test9.110011.410010.2100
All Tests3.41003.41003.4100

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 (3.4) to the normalized speed of ObjectDB embedded database (100) reveals that in these tests, ObjectDB embedded is 29.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.67) to the normalized speed of ObjectDB embedded database (100) reveals that in that case, ObjectDB embedded is 149 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 Test4.899.75.61005.299.9
Element Collection Test3.299.51.397.52.398.5
Inheritance Test4.41005.61005.0100
Indexing Test4.91008.296.56.698.3
Graph (Binary Tree) Test1.11001.199.81.199.9
Multithreading Test11.298.713.094.312.196.5
All Tests5.199.65.997.95.598.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 (5.5) to the normalized speed of ObjectDB embedded database (98.8) reveals that in these tests, ObjectDB embedded is 18.0 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 (1.1) to the normalized speed of ObjectDB embedded database (100) reveals that in that case, ObjectDB embedded is 90.9 times faster than Hibernate with MySQL server.

Other Head to Head DBMS/JPA Comparisons