Compare with

Comparison of OpenJPA with Derby embedded vs OpenJPA with Derby 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
 OpenJPA
Derby embedded
OpenJPA
Derby server
OpenJPA
Derby embedded
OpenJPA
Derby server
OpenJPA
Derby embedded
OpenJPA
Derby server
Basic Person Test4.83.12.92.73.92.9
Element Collection Test2.82.01.91.72.41.8
Inheritance Test4.13.02.42.33.32.6
Indexing Test6.14.74.14.15.14.4
Graph (Binary Tree) Test1.50.711.40.641.40.67
Multithreading Test8.76.03.33.86.04.9
All Tests4.73.32.72.53.72.9

The results above show that in general OpenJPA with Derby embedded is slightly more efficient than OpenJPA with Derby server in persisting JPA entity objects to the database.

A large 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 Derby embedded database (1.4) reveals that in that case, OpenJPA with Derby embedded is 2.2 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 embedded
OpenJPA
Derby server
OpenJPA
Derby embedded
OpenJPA
Derby server
OpenJPA
Derby embedded
OpenJPA
Derby server
Basic Person Test14.80.7822.611.618.76.2
Element Collection Test0.00310.00242.31.11.20.54
Inheritance Test0.0150.0147.05.03.52.5
Indexing Test11.70.6226.513.019.16.8
Graph (Binary Tree) Test0.930.0651.20.391.10.23
Multithreading Test25.21.628.619.026.910.3
All Tests8.80.5114.78.411.74.4

The results above show that in general OpenJPA with Derby embedded is 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 Derby embedded database (11.7) reveals that in these tests, OpenJPA with Derby embedded is 2.7 times faster than OpenJPA with Derby server.

A huge performance gap has been detected when using simple basic entities with small retrieval size. Comparing the normalized speed of OpenJPA with Derby database server (0.78) to the normalized speed of OpenJPA with Derby embedded database (14.8) reveals that in that case, OpenJPA with Derby embedded is 19.0 times faster 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 embedded
OpenJPA
Derby server
OpenJPA
Derby embedded
OpenJPA
Derby server
OpenJPA
Derby embedded
OpenJPA
Derby server
Basic Person Test49.729.29.95.529.817.3
Element Collection Test2.72.29.61.46.11.8
Inheritance Test2.32.21.31.01.81.6
Indexing Test7.02.217.111.712.17.0
Multithreading Test40.935.511.78.326.321.9
All Tests20.514.39.95.615.29.9

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

A large performance gap has been detected when using JPA element collections with large retrieval size. Comparing the normalized speed of OpenJPA with Derby database server (1.4) to the normalized speed of OpenJPA with Derby embedded database (9.6) reveals that in that case, OpenJPA with Derby embedded is 6.9 times faster than OpenJPA with Derby server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
Derby embedded
OpenJPA
Derby server
OpenJPA
Derby embedded
OpenJPA
Derby server
OpenJPA
Derby embedded
OpenJPA
Derby server
Basic Person Test5.61.55.24.05.42.8
Element Collection Test0.00900.00812.21.91.10.94
Inheritance Test0.0450.0434.63.82.31.9
Indexing Test6.11.88.76.87.44.3
Graph (Binary Tree) Test1.60.160.910.271.30.22
Multithreading Test18.36.94.55.011.45.9
All Tests5.31.74.43.64.82.7

The results above show that in general OpenJPA with Derby embedded is more efficient than OpenJPA with Derby server in updating JPA entity objects in the database.

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 Derby embedded database (1.6) reveals that in that case, OpenJPA with Derby embedded is 10.0 times faster 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 embedded
OpenJPA
Derby server
OpenJPA
Derby embedded
OpenJPA
Derby server
OpenJPA
Derby embedded
OpenJPA
Derby server
Basic Person Test4.21.44.53.74.32.5
Element Collection Test0.00710.00821.61.40.800.71
Inheritance Test0.0350.0353.02.51.51.3
Indexing Test5.32.33.63.54.42.9
Graph (Binary Tree) Test0.800.130.930.350.860.24
Multithreading Test5.73.66.24.06.03.8
All Tests2.71.33.32.63.01.9

The results above show that in general OpenJPA with Derby embedded is more efficient than OpenJPA with Derby server in deleting JPA entity objects from the database.

A large 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 Derby embedded database (0.80) reveals that in that case, OpenJPA with Derby embedded is 6.2 times faster 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 embedded
OpenJPA
Derby server
OpenJPA
Derby embedded
OpenJPA
Derby server
OpenJPA
Derby embedded
OpenJPA
Derby server
Basic Person Test15.87.29.05.512.46.4
Element Collection Test1.10.843.51.52.31.2
Inheritance Test1.31.13.72.92.52.0
Indexing Test7.22.312.07.89.65.1
Graph (Binary Tree) Test1.20.271.10.411.20.34
Multithreading Test19.810.710.98.015.39.4
All Tests8.03.96.94.57.44.2

The results above show that in general OpenJPA with Derby embedded is more efficient than OpenJPA with Derby server in performing JPA database operations.

A large 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 Derby embedded database (1.2) reveals that in that case, OpenJPA with Derby embedded is 4.4 times faster than OpenJPA with Derby server.

Other Head to Head DBMS/JPA Comparisons