Compare with

Comparison of OpenJPA with PostgreSQL server vs DataNucleus with SQLite 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
PostgreSQL server
DataNucleus
SQLite embedded
OpenJPA
PostgreSQL server
DataNucleus
SQLite embedded
OpenJPA
PostgreSQL server
DataNucleus
SQLite embedded
Basic Person Test6.0 7.0 6.5 
Element Collection Test6.8 6.7 6.7 
Inheritance Test4.0 7.5 5.7 
Indexing Test7.2 9.3 8.3 
Graph (Binary Tree) Test2.4 2.5 2.5 
Multithreading Test7.6 0.0000 3.8 
All Tests5.7 5.5 5.6 

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
PostgreSQL server
DataNucleus
SQLite embedded
OpenJPA
PostgreSQL server
DataNucleus
SQLite embedded
OpenJPA
PostgreSQL server
DataNucleus
SQLite embedded
Basic Person Test2.10.4310.3 6.20.43
Element Collection Test0.40 8.9 4.6 
Inheritance Test2.2 8.2 5.2 
Indexing Test1.6 12.4 7.0 
Graph (Binary Tree) Test0.12 0.18 0.15 
Multithreading Test3.7 6.4 5.0 
All Tests1.70.437.7 4.70.43

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
 OpenJPA
PostgreSQL server
DataNucleus
SQLite embedded
OpenJPA
PostgreSQL server
DataNucleus
SQLite embedded
OpenJPA
PostgreSQL server
DataNucleus
SQLite embedded
Basic Person Testfailedfailedfailed failedfailed
Element Collection Testfailed failed failed 
Inheritance Testfailed failed failed 
Indexing Testfailed failed failed 
Multithreading Testfailed failed failed 
All Testsfailedfailedfailed failedfailed

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
PostgreSQL server
DataNucleus
SQLite embedded
OpenJPA
PostgreSQL server
DataNucleus
SQLite embedded
OpenJPA
PostgreSQL server
DataNucleus
SQLite embedded
Basic Person Test1.20.0253.4 2.30.025
Element Collection Test1.5 3.8 2.6 
Inheritance Test1.2 3.8 2.5 
Indexing Test3.9 4.6 4.3 
Graph (Binary Tree) Test0.45 0.28 0.36 
Multithreading Test0.92 0.34 0.63 
All Tests1.50.0252.7 2.10.025

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
 OpenJPA
PostgreSQL server
DataNucleus
SQLite embedded
OpenJPA
PostgreSQL server
DataNucleus
SQLite embedded
OpenJPA
PostgreSQL server
DataNucleus
SQLite embedded
Basic Person Test8.20.1710.9 9.60.17
Element Collection Test5.4 2.4 3.9 
Inheritance Test8.5 5.7 7.1 
Indexing Test14.1 6.2 10.2 
Graph (Binary Tree) Test4.5 7.5 6.0 
Multithreading Test6.8 0.0000 3.4 
All Tests7.90.175.5 6.70.17

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
 OpenJPA
PostgreSQL server
DataNucleus
SQLite embedded
OpenJPA
PostgreSQL server
DataNucleus
SQLite embedded
OpenJPA
PostgreSQL server
DataNucleus
SQLite embedded
Basic Person Test4.40.217.9 6.10.21
Element Collection Test3.5 5.4 4.5 
Inheritance Test4.0 6.3 5.1 
Indexing Test6.7 8.1 7.4 
Graph (Binary Tree) Test1.9 2.6 2.3 
Multithreading Test4.8 1.7 3.2 
All Tests4.20.215.3 4.80.21

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