Compare with

Comparison of DataNucleus with SQLite embedded vs OpenJPA with PostgreSQL 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
PostgreSQL server
DataNucleus
SQLite embedded
OpenJPA
PostgreSQL server
DataNucleus
SQLite embedded
OpenJPA
PostgreSQL server
Basic Person Test 6.0 7.0 6.5
Element Collection Test 6.8 6.7 6.7
Inheritance Test 4.0 7.5 5.7
Indexing Test 7.2 9.3 8.3
Graph (Binary Tree) Test 2.4 2.5 2.5
Multithreading Test 7.6 0.0000 3.8
All Tests 5.7 5.5 5.6

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
SQLite embedded
OpenJPA
PostgreSQL server
DataNucleus
SQLite embedded
OpenJPA
PostgreSQL server
DataNucleus
SQLite embedded
OpenJPA
PostgreSQL server
Basic Person Test0.432.1 10.30.436.2
Element Collection Test 0.40 8.9 4.6
Inheritance Test 2.2 8.2 5.2
Indexing Test 1.6 12.4 7.0
Graph (Binary Tree) Test 0.12 0.18 0.15
Multithreading Test 3.7 6.4 5.0
All Tests0.431.7 7.70.434.7

The results above show that in general OpenJPA with PostgreSQL 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 PostgreSQL database server (4.7) reveals that in these tests, OpenJPA with PostgreSQL server is 10.9 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 PostgreSQL database server (2.1) reveals that in that case, OpenJPA with PostgreSQL server is 4.9 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
PostgreSQL server
DataNucleus
SQLite embedded
OpenJPA
PostgreSQL server
DataNucleus
SQLite embedded
OpenJPA
PostgreSQL server
Basic Person Testfailedfailed failedfailedfailed
Element Collection Test failed failed failed
Inheritance Test failed failed failed
Indexing Test failed failed failed
Multithreading Test failed failed failed
All Testsfailedfailed failedfailedfailed

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
SQLite embedded
OpenJPA
PostgreSQL server
DataNucleus
SQLite embedded
OpenJPA
PostgreSQL server
DataNucleus
SQLite embedded
OpenJPA
PostgreSQL server
Basic Person Test0.0251.2 3.40.0252.3
Element Collection Test 1.5 3.8 2.6
Inheritance Test 1.2 3.8 2.5
Indexing Test 3.9 4.6 4.3
Graph (Binary Tree) Test 0.45 0.28 0.36
Multithreading Test 0.92 0.34 0.63
All Tests0.0251.5 2.70.0252.1

The results above show that in general OpenJPA with PostgreSQL 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 PostgreSQL database server (2.1) reveals that in these tests, OpenJPA with PostgreSQL server is 84.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 PostgreSQL database server (1.2) reveals that in that case, OpenJPA with PostgreSQL server is 48.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
PostgreSQL server
DataNucleus
SQLite embedded
OpenJPA
PostgreSQL server
DataNucleus
SQLite embedded
OpenJPA
PostgreSQL server
Basic Person Test0.178.2 10.90.179.6
Element Collection Test 5.4 2.4 3.9
Inheritance Test 8.5 5.7 7.1
Indexing Test 14.1 6.2 10.2
Graph (Binary Tree) Test 4.5 7.5 6.0
Multithreading Test 6.8 0.0000 3.4
All Tests0.177.9 5.50.176.7

The results above show that in general OpenJPA with PostgreSQL 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 PostgreSQL database server (6.7) reveals that in these tests, OpenJPA with PostgreSQL server is 39.4 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 PostgreSQL database server (8.2) reveals that in that case, OpenJPA with PostgreSQL server is 48.2 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
PostgreSQL server
DataNucleus
SQLite embedded
OpenJPA
PostgreSQL server
DataNucleus
SQLite embedded
OpenJPA
PostgreSQL server
Basic Person Test0.214.4 7.90.216.1
Element Collection Test 3.5 5.4 4.5
Inheritance Test 4.0 6.3 5.1
Indexing Test 6.7 8.1 7.4
Graph (Binary Tree) Test 1.9 2.6 2.3
Multithreading Test 4.8 1.7 3.2
All Tests0.214.2 5.30.214.8

The results above show that in general OpenJPA with PostgreSQL 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 PostgreSQL database server (4.8) reveals that in these tests, OpenJPA with PostgreSQL server is 22.9 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 PostgreSQL database server (4.4) reveals that in that case, OpenJPA with PostgreSQL server is 21.0 times faster than DataNucleus with SQLite embedded.

Other Head to Head DBMS/JPA Comparisons