Compare with

Comparison of OpenJPA with Derby server vs OpenJPA with HSQLDB 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
Derby server
OpenJPA
HSQLDB embedded
OpenJPA
Derby server
OpenJPA
HSQLDB embedded
OpenJPA
Derby server
OpenJPA
HSQLDB embedded
Basic Person Test3.113.32.76.92.910.1
Element Collection Test2.08.61.75.31.87.0
Inheritance Test3.012.22.35.82.69.0
Indexing Test4.716.74.19.14.412.9
Graph (Binary Tree) Test0.716.10.647.30.676.7
Multithreading Test6.026.83.87.04.916.9
All Tests3.313.92.56.92.910.4

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

A huge performance gap has been detected when using graphs of objects with large transaction size. Comparing the normalized speed of OpenJPA with Derby database server (0.64) to the normalized speed of OpenJPA with HSQLDB embedded database (7.3) reveals that in that case, OpenJPA with HSQLDB embedded is 11.4 times faster than OpenJPA with Derby server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
Derby server
OpenJPA
HSQLDB embedded
OpenJPA
Derby server
OpenJPA
HSQLDB embedded
OpenJPA
Derby server
OpenJPA
HSQLDB embedded
Basic Person Test0.7821.811.630.16.225.9
Element Collection Test0.00240.00681.14.50.542.2
Inheritance Test0.0140.00255.02.02.50.98
Indexing Test0.6222.113.043.66.832.9
Graph (Binary Tree) Test0.0652.10.392.10.232.1
Multithreading Test1.620.919.023.510.322.2
All Tests0.5111.18.417.64.414.4

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

A huge performance gap has been detected when using database indexes with small retrieval size. Comparing the normalized speed of OpenJPA with Derby database server (0.62) to the normalized speed of OpenJPA with HSQLDB embedded database (22.1) reveals that in that case, OpenJPA with HSQLDB embedded is 35.6 times faster than OpenJPA with Derby server.

On the other hand, OpenJPA with HSQLDB embedded is slower, for instance, 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 OpenJPA with Derby database server (0.014) reveals that in that case, OpenJPA with HSQLDB embedded is 5.6 times slower than OpenJPA with Derby server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
Derby server
OpenJPA
HSQLDB embedded
OpenJPA
Derby server
OpenJPA
HSQLDB embedded
OpenJPA
Derby server
OpenJPA
HSQLDB embedded
Basic Person Test29.22.85.50.9117.31.9
Element Collection Test2.21.41.40.951.81.2
Inheritance Test2.22.41.01.31.61.8
Indexing Test2.215.411.734.37.024.9
Multithreading Test35.51.48.30.5321.90.95
All Tests14.34.75.67.69.96.1

The results above show that in general OpenJPA with Derby server is more efficient than OpenJPA with HSQLDB embedded in executing the tested JPA queries.

A huge performance gap has been detected when using multithreading with small retrieval size. Comparing the normalized speed of OpenJPA with HSQLDB embedded database (1.4) to the normalized speed of OpenJPA with Derby database server (35.5) reveals that in that case, OpenJPA with Derby server is 25.4 times faster than OpenJPA with HSQLDB embedded.

On the other hand, OpenJPA with Derby server is slower, for instance, when using database indexes with small retrieval size. Comparing the normalized speed of OpenJPA with Derby database server (2.2) to the normalized speed of OpenJPA with HSQLDB embedded database (15.4) reveals that in that case, OpenJPA with Derby server is 7.0 times slower than OpenJPA with HSQLDB embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
Derby server
OpenJPA
HSQLDB embedded
OpenJPA
Derby server
OpenJPA
HSQLDB embedded
OpenJPA
Derby server
OpenJPA
HSQLDB embedded
Basic Person Test1.512.04.05.32.88.6
Element Collection Test0.00810.0171.93.70.941.8
Inheritance Test0.0430.00983.82.01.90.99
Indexing Test1.89.36.85.54.37.4
Graph (Binary Tree) Test0.162.50.271.60.222.1
Multithreading Test6.920.05.03.75.911.8
All Tests1.77.33.63.62.75.5

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

A huge performance gap has been detected when using graphs of objects with small transaction size. Comparing the normalized speed of OpenJPA with Derby database server (0.16) to the normalized speed of OpenJPA with HSQLDB embedded database (2.5) reveals that in that case, OpenJPA with HSQLDB embedded is 15.6 times faster than OpenJPA with Derby server.

On the other hand, OpenJPA with HSQLDB embedded is slower, for instance, 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 OpenJPA with Derby database server (0.043) reveals that in that case, OpenJPA with HSQLDB embedded is 4.4 times slower than OpenJPA with Derby server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
Derby server
OpenJPA
HSQLDB embedded
OpenJPA
Derby server
OpenJPA
HSQLDB embedded
OpenJPA
Derby server
OpenJPA
HSQLDB embedded
Basic Person Test1.421.33.715.72.518.5
Element Collection Test0.00820.0111.42.90.711.5
Inheritance Test0.0350.00702.53.51.31.8
Indexing Test2.328.83.515.22.922.0
Graph (Binary Tree) Test0.132.90.353.60.243.2
Multithreading Test3.626.04.019.63.822.8
All Tests1.313.22.610.11.911.6

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

A huge performance gap has been detected when using graphs of objects with small transaction size. Comparing the normalized speed of OpenJPA with Derby database server (0.13) to the normalized speed of OpenJPA with HSQLDB embedded database (2.9) reveals that in that case, OpenJPA with HSQLDB embedded is 22.3 times faster than OpenJPA with Derby server.

On the other hand, OpenJPA with HSQLDB embedded is slower, for instance, 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 OpenJPA with Derby database server (0.035) reveals that in that case, OpenJPA with HSQLDB embedded is 5.0 times slower than OpenJPA with Derby server.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 OpenJPA
Derby server
OpenJPA
HSQLDB embedded
OpenJPA
Derby server
OpenJPA
HSQLDB embedded
OpenJPA
Derby server
OpenJPA
HSQLDB embedded
Basic Person Test7.214.35.511.86.413.0
Element Collection Test0.842.01.53.51.22.7
Inheritance Test1.12.92.92.92.02.9
Indexing Test2.318.57.821.65.120.0
Graph (Binary Tree) Test0.273.40.413.70.343.5
Multithreading Test10.719.08.010.99.414.9
All Tests3.910.24.59.24.29.7

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

A huge performance gap has been detected when using graphs of objects with small transaction/retrieval size. Comparing the normalized speed of OpenJPA with Derby database server (0.27) to the normalized speed of OpenJPA with HSQLDB embedded database (3.4) reveals that in that case, OpenJPA with HSQLDB embedded is 12.6 times faster than OpenJPA with Derby server.

Other Head to Head DBMS/JPA Comparisons