Compare with

Comparison of OpenJPA with HSQLDB embedded 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
 OpenJPA
HSQLDB embedded
ObjectDB embeddedOpenJPA
HSQLDB embedded
ObjectDB embeddedOpenJPA
HSQLDB embedded
ObjectDB embedded
Basic Person Test13.31006.910010.1100
Element Collection Test8.61005.31007.0100
Inheritance Test12.21005.81009.0100
Indexing Test16.71009.110012.9100
Graph (Binary Tree) Test6.188.47.31006.794.2
Multithreading Test26.81007.010016.9100
All Tests13.998.16.910010.499.0

The results above show that in general ObjectDB embedded is much more efficient than OpenJPA with HSQLDB embedded in persisting JPA entity objects to the database. Comparing the normalized speed of OpenJPA with HSQLDB embedded database (10.4) to the normalized speed of ObjectDB embedded database (99.0) reveals that in these tests, ObjectDB embedded is 9.5 times faster than OpenJPA with HSQLDB embedded.

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
HSQLDB embedded
ObjectDB embeddedOpenJPA
HSQLDB embedded
ObjectDB embeddedOpenJPA
HSQLDB embedded
ObjectDB embedded
Basic Person Test21.810030.110025.9100
Element Collection Test0.00681004.51002.2100
Inheritance Test0.00251002.01000.98100
Indexing Test22.110043.610032.9100
Graph (Binary Tree) Test2.11002.11002.1100
Multithreading Test20.910023.510022.2100
All Tests11.110017.610014.4100

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

A huge performance gap has been detected when using class inheritance in the object model with small retrieval size. Comparing the normalized speed of OpenJPA with HSQLDB embedded database (0.0025) to the normalized speed of ObjectDB embedded database (100) reveals that in that case, ObjectDB embedded is 40,000 times faster than OpenJPA with HSQLDB embedded.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
HSQLDB embedded
ObjectDB embeddedOpenJPA
HSQLDB embedded
ObjectDB embeddedOpenJPA
HSQLDB embedded
ObjectDB embedded
Basic Person Test2.81000.911001.9100
Element Collection Test1.41000.951001.2100
Inheritance Test2.41001.31001.8100
Indexing Test15.410034.310024.9100
Multithreading Test1.41000.531000.95100
All Tests4.71007.61006.1100

The results above show that in general ObjectDB embedded is much more efficient than OpenJPA with HSQLDB embedded in executing the tested JPA queries. Comparing the normalized speed of OpenJPA with HSQLDB embedded database (6.1) to the normalized speed of ObjectDB embedded database (100) reveals that in these tests, ObjectDB embedded is 16.4 times faster than OpenJPA with HSQLDB embedded.

A huge performance gap has been detected when using multithreading with large retrieval size. Comparing the normalized speed of OpenJPA with HSQLDB embedded database (0.53) to the normalized speed of ObjectDB embedded database (100) reveals that in that case, ObjectDB embedded is 189 times faster than OpenJPA with HSQLDB embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
HSQLDB embedded
ObjectDB embeddedOpenJPA
HSQLDB embedded
ObjectDB embeddedOpenJPA
HSQLDB embedded
ObjectDB embedded
Basic Person Test12.01005.31008.6100
Element Collection Test0.0171003.71001.8100
Inheritance Test0.00981002.01000.99100
Indexing Test9.31005.51007.4100
Graph (Binary Tree) Test2.51001.61002.1100
Multithreading Test20.01003.710011.8100
All Tests7.31003.61005.5100

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

A huge performance gap has been detected when using class inheritance in the object model with small transaction size. Comparing the normalized speed of OpenJPA with HSQLDB embedded database (0.0098) to the normalized speed of ObjectDB embedded database (100) reveals that in that case, ObjectDB embedded is 10,204 times faster than OpenJPA with HSQLDB embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
HSQLDB embedded
ObjectDB embeddedOpenJPA
HSQLDB embedded
ObjectDB embeddedOpenJPA
HSQLDB embedded
ObjectDB embedded
Basic Person Test21.310015.710018.5100
Element Collection Test0.0111002.91001.5100
Inheritance Test0.00701003.51001.8100
Indexing Test28.810015.210022.0100
Graph (Binary Tree) Test2.91003.61003.2100
Multithreading Test26.010019.610022.8100
All Tests13.210010.110011.6100

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

A huge performance gap has been detected when using class inheritance in the object model with small transaction size. Comparing the normalized speed of OpenJPA with HSQLDB embedded database (0.0070) to the normalized speed of ObjectDB embedded database (100) reveals that in that case, ObjectDB embedded is 14,286 times faster than OpenJPA with HSQLDB embedded.

Comparison of database storage efficiency (normalized score, higher is better)

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
HSQLDB embedded
ObjectDB embeddedOpenJPA
HSQLDB embedded
ObjectDB embeddedOpenJPA
HSQLDB embedded
ObjectDB embedded
Basic Person Test41.410041.410041.4100
Element Collection Test46.910046.910046.9100
Inheritance Test41.410041.410041.4100
Indexing Test48.410049.210048.8100
Graph (Binary Tree) Test28.510021.410025.0100
Multithreading Test51.991.110.322.031.156.6
All Tests43.198.535.187.039.192.8

The results above show that in general ObjectDB embedded is more efficient than OpenJPA with HSQLDB embedded in using disk space. Comparing the normalized score of OpenJPA with HSQLDB embedded database (39.1) to the normalized score of ObjectDB embedded database (92.8) reveals that in these tests, ObjectDB embedded is 2.4 times more efficient than OpenJPA with HSQLDB embedded.

A large gap has been detected when using graphs of objects with large transaction size. Comparing the normalized score of OpenJPA with HSQLDB embedded database (21.4) to the normalized score of ObjectDB embedded database (100) reveals that in that case, ObjectDB embedded is 4.7 times more efficient than OpenJPA with HSQLDB embedded.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 OpenJPA
HSQLDB embedded
ObjectDB embeddedOpenJPA
HSQLDB embedded
ObjectDB embeddedOpenJPA
HSQLDB embedded
ObjectDB embedded
Basic Person Test14.310011.810013.0100
Element Collection Test2.01003.51002.7100
Inheritance Test2.91002.91002.9100
Indexing Test18.510021.610020.0100
Graph (Binary Tree) Test3.497.13.71003.598.5
Multithreading Test19.010010.910014.9100
All Tests10.299.69.21009.799.8

The results above show that in general ObjectDB embedded is much more efficient than OpenJPA with HSQLDB embedded in performing JPA database operations. Comparing the normalized speed of OpenJPA with HSQLDB embedded database (9.7) to the normalized speed of ObjectDB embedded database (99.8) reveals that in these tests, ObjectDB embedded is 10.3 times faster than OpenJPA with HSQLDB embedded.

A huge performance gap has been detected when using JPA element collections with small transaction/retrieval size. Comparing the normalized speed of OpenJPA with HSQLDB embedded database (2.0) to the normalized speed of ObjectDB embedded database (100) reveals that in that case, ObjectDB embedded is 50.0 times faster than OpenJPA with HSQLDB embedded.

Other Head to Head DBMS/JPA Comparisons