Compare with

Comparison of DataNucleus with SQLite embedded vs OpenJPA with H2 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
 DataNucleus
SQLite embedded
OpenJPA
H2 server
DataNucleus
SQLite embedded
OpenJPA
H2 server
DataNucleus
SQLite embedded
OpenJPA
H2 server
Basic Person Test 8.1 6.6 7.3
Element Collection Test 6.4 6.9 6.7
Inheritance Test 4.4 7.4 5.9
Indexing Test 7.2 9.4 8.3
Graph (Binary Tree) Test 2.5 2.1 2.3
Multithreading Test 7.8 0.0000 3.9
All Tests 6.1 5.4 5.7

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
SQLite embedded
OpenJPA
H2 server
DataNucleus
SQLite embedded
OpenJPA
H2 server
DataNucleus
SQLite embedded
OpenJPA
H2 server
Basic Person Test0.431.7 6.10.433.9
Element Collection Test 0.32 6.9 3.6
Inheritance Test 0.82 4.8 2.8
Indexing Test 1.1 9.7 5.4
Graph (Binary Tree) Test 0.11 0.15 0.13
Multithreading Test 2.2 9.6 5.9
All Tests0.431.1 6.20.433.6

The results above show that in general OpenJPA with H2 server is much more efficient than DataNucleus with SQLite embedded in retrieving JPA entity objects from the database. Comparing the normalized speed of DataNucleus with SQLite embedded database (0.43) to the normalized speed of OpenJPA with H2 database server (3.6) reveals that in these tests, OpenJPA with H2 server is 8.4 times faster than DataNucleus with SQLite embedded.

A large performance gap has been detected when using simple basic entities with small retrieval size. Comparing the normalized speed of DataNucleus with SQLite embedded database (0.43) to the normalized speed of OpenJPA with H2 database server (1.7) reveals that in that case, OpenJPA with H2 server is 4.0 times faster than DataNucleus with SQLite embedded.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
SQLite embedded
OpenJPA
H2 server
DataNucleus
SQLite embedded
OpenJPA
H2 server
DataNucleus
SQLite embedded
OpenJPA
H2 server
Basic Person Testfailed0.54 2.2failed1.4
Element Collection Test 0.53 2.0 1.3
Inheritance Test 0.42 2.1 1.2
Indexing Test 0.78 2.6 1.7
Multithreading Test 2.9 4.3 3.6
All Testsfailed1.0 2.6failed1.8

DataNucleus with SQLite embedded has failed in 1 tests (see exceptions).

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
SQLite embedded
OpenJPA
H2 server
DataNucleus
SQLite embedded
OpenJPA
H2 server
DataNucleus
SQLite embedded
OpenJPA
H2 server
Basic Person Test0.0251.1 2.10.0251.6
Element Collection Test 1.2 3.6 2.4
Inheritance Test 1.2 2.5 1.8
Indexing Test 3.3 2.9 3.1
Graph (Binary Tree) Test 0.61 0.34 0.48
Multithreading Test 2.7 0.76 1.8
All Tests0.0251.7 2.00.0251.9

The results above show that in general OpenJPA with H2 server is much more efficient than DataNucleus with SQLite embedded in updating JPA entity objects in the database. Comparing the normalized speed of DataNucleus with SQLite embedded database (0.025) to the normalized speed of OpenJPA with H2 database server (1.9) reveals that in these tests, OpenJPA with H2 server is 76.0 times faster than DataNucleus with SQLite embedded.

A huge performance gap has been detected when using simple basic entities with small transaction size. Comparing the normalized speed of DataNucleus with SQLite embedded database (0.025) to the normalized speed of OpenJPA with H2 database server (1.1) reveals that in that case, OpenJPA with H2 server is 44.0 times faster than DataNucleus with SQLite embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
SQLite embedded
OpenJPA
H2 server
DataNucleus
SQLite embedded
OpenJPA
H2 server
DataNucleus
SQLite embedded
OpenJPA
H2 server
Basic Person Test0.176.9 11.60.179.3
Element Collection Test 3.5 2.2 2.9
Inheritance Test 8.0 5.4 6.7
Indexing Test 12.2 5.8 9.0
Graph (Binary Tree) Test 7.4 10.0 8.7
Multithreading Test 8.3 0.0000 4.1
All Tests0.177.7 5.80.176.8

The results above show that in general OpenJPA with H2 server is much more efficient than DataNucleus with SQLite embedded in deleting JPA entity objects from the database. Comparing the normalized speed of DataNucleus with SQLite embedded database (0.17) to the normalized speed of OpenJPA with H2 database server (6.8) reveals that in these tests, OpenJPA with H2 server is 40.0 times faster than DataNucleus with SQLite embedded.

A huge performance gap has been detected when using simple basic entities with small transaction size. Comparing the normalized speed of DataNucleus with SQLite embedded database (0.17) to the normalized speed of OpenJPA with H2 database server (6.9) reveals that in that case, OpenJPA with H2 server is 40.6 times faster than DataNucleus with SQLite embedded.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 DataNucleus
SQLite embedded
OpenJPA
H2 server
DataNucleus
SQLite embedded
OpenJPA
H2 server
DataNucleus
SQLite embedded
OpenJPA
H2 server
Basic Person Test0.213.7 5.70.214.7
Element Collection Test 2.4 4.3 3.4
Inheritance Test 3.0 4.4 3.7
Indexing Test 4.9 6.1 5.5
Graph (Binary Tree) Test 2.7 3.2 2.9
Multithreading Test 4.8 2.9 3.9
All Tests0.213.6 4.50.214.0

The results above show that in general OpenJPA with H2 server is much more efficient than DataNucleus with SQLite embedded in performing JPA database operations. Comparing the normalized speed of DataNucleus with SQLite embedded database (0.21) to the normalized speed of OpenJPA with H2 database server (4.0) reveals that in these tests, OpenJPA with H2 server is 19.0 times faster than DataNucleus with SQLite embedded.

A huge performance gap has been detected when using simple basic entities with small transaction/retrieval size. Comparing the normalized speed of DataNucleus with SQLite embedded database (0.21) to the normalized speed of OpenJPA with H2 database server (3.7) reveals that in that case, OpenJPA with H2 server is 17.6 times faster than DataNucleus with SQLite embedded.

Other Head to Head DBMS/JPA Comparisons