Compare with

Comparison of DataNucleus with MySQL server vs Hibernate 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
 DataNucleus
MySQL server
Hibernate
SQLite embedded
DataNucleus
MySQL server
Hibernate
SQLite embedded
DataNucleus
MySQL server
Hibernate
SQLite embedded
Basic Person Test2.60.0831.41.02.00.55
Element Collection Test1.00.0670.480.690.760.38
Inheritance Test2.50.0801.30.991.90.54
Indexing Test4.00.0982.51.03.30.55
Graph (Binary Tree) Test1.10.270.990.961.10.61
Multithreading Test6.2failed2.5failed4.4failed
All Tests2.90.121.50.932.20.53

Hibernate with SQLite embedded has failed in 2 tests (see exceptions).

The results above show that in general DataNucleus with MySQL server is much more efficient than Hibernate with SQLite embedded in persisting JPA entity objects to the database. Comparing the normalized speed of Hibernate with SQLite embedded database (0.53) to the normalized speed of DataNucleus with MySQL database server (2.2) reveals that in these tests, DataNucleus with MySQL server is 4.2 times faster than Hibernate with SQLite embedded.

A huge performance gap has been detected when using database indexes with small transaction size. Comparing the normalized speed of Hibernate with SQLite embedded database (0.098) to the normalized speed of DataNucleus with MySQL database server (4.0) reveals that in that case, DataNucleus with MySQL server is 40.8 times faster than Hibernate with SQLite embedded.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
MySQL server
Hibernate
SQLite embedded
DataNucleus
MySQL server
Hibernate
SQLite embedded
DataNucleus
MySQL server
Hibernate
SQLite embedded
Basic Person Test0.961.89.31.35.11.5
Element Collection Test0.180.00080.77failed0.470.0008
Inheritance Test0.552.48.51.44.51.9
Indexing Test0.821.99.72.35.32.1
Graph (Binary Tree) Test2.10.563.50.882.80.72
Multithreading Test0.27failed7.8failed4.0failed
All Tests0.811.36.61.53.71.4

Hibernate with SQLite embedded has failed in 3 tests (see exceptions).

The results above show that in general DataNucleus with MySQL server is more efficient than Hibernate with SQLite embedded in retrieving JPA entity objects from the database. Comparing the normalized speed of Hibernate with SQLite embedded database (1.4) to the normalized speed of DataNucleus with MySQL database server (3.7) reveals that in these tests, DataNucleus with MySQL server is 2.6 times faster than Hibernate with SQLite embedded.

A huge performance gap has been detected when using JPA element collections with small retrieval size. Comparing the normalized speed of Hibernate with SQLite embedded database (0.0008) to the normalized speed of DataNucleus with MySQL database server (0.18) reveals that in that case, DataNucleus with MySQL server is 225 times faster than Hibernate with SQLite embedded.

On the other hand, DataNucleus with MySQL server is slower, for instance, when using class inheritance in the object model with small retrieval size. Comparing the normalized speed of DataNucleus with MySQL database server (0.55) to the normalized speed of Hibernate with SQLite embedded database (2.4) reveals that in that case, DataNucleus with MySQL server is 4.4 times slower than Hibernate with SQLite embedded.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
MySQL server
Hibernate
SQLite embedded
DataNucleus
MySQL server
Hibernate
SQLite embedded
DataNucleus
MySQL server
Hibernate
SQLite embedded
Basic Person Test7.21.12.20.224.70.65
Element Collection Test5.80.390.27failed3.10.39
Inheritance Test2.90.531.70.282.30.40
Indexing Test0.00840.00112.50.431.20.21
Multithreading Testfailedfailedfailedfailedfailedfailed
All Tests4.00.501.70.312.80.42

DataNucleus with MySQL server has failed in 2 tests (see exceptions). Hibernate with SQLite embedded has failed in 3 tests (see exceptions).

The results above show that in general DataNucleus with MySQL server is much more efficient than Hibernate with SQLite embedded in executing the tested JPA queries. Comparing the normalized speed of Hibernate with SQLite embedded database (0.42) to the normalized speed of DataNucleus with MySQL database server (2.8) reveals that in these tests, DataNucleus with MySQL server is 6.7 times faster than Hibernate with SQLite embedded.

A huge performance gap has been detected when using JPA element collections with small retrieval size. Comparing the normalized speed of Hibernate with SQLite embedded database (0.39) to the normalized speed of DataNucleus with MySQL database server (5.8) reveals that in that case, DataNucleus with MySQL server is 14.9 times faster than Hibernate with SQLite embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
MySQL server
Hibernate
SQLite embedded
DataNucleus
MySQL server
Hibernate
SQLite embedded
DataNucleus
MySQL server
Hibernate
SQLite embedded
Basic Person Test0.610.0761.10.650.880.37
Element Collection Test0.310.00220.44failed0.380.0022
Inheritance Test0.510.0791.80.971.10.53
Indexing Test0.680.0572.20.541.50.30
Graph (Binary Tree) Test0.910.260.470.420.690.34
Multithreading Test0.64failedfailedfailed0.64failed
All Tests0.610.0941.20.650.880.34

DataNucleus with MySQL server has failed in 1 tests (see exceptions). Hibernate with SQLite embedded has failed in 3 tests (see exceptions).

The results above show that in general DataNucleus with MySQL server is more efficient than Hibernate with SQLite embedded in updating JPA entity objects in the database. Comparing the normalized speed of Hibernate with SQLite embedded database (0.34) to the normalized speed of DataNucleus with MySQL database server (0.88) reveals that in these tests, DataNucleus with MySQL server is 2.6 times faster than Hibernate with SQLite embedded.

A huge performance gap has been detected when using JPA element collections with small transaction size. Comparing the normalized speed of Hibernate with SQLite embedded database (0.0022) to the normalized speed of DataNucleus with MySQL database server (0.31) reveals that in that case, DataNucleus with MySQL server is 141 times faster than Hibernate with SQLite embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
MySQL server
Hibernate
SQLite embedded
DataNucleus
MySQL server
Hibernate
SQLite embedded
DataNucleus
MySQL server
Hibernate
SQLite embedded
Basic Person Test0.700.0611.30.911.00.49
Element Collection Test0.170.00070.40failed0.290.0007
Inheritance Test0.410.0581.30.900.870.48
Indexing Test1.70.0791.90.541.80.31
Graph (Binary Tree) Test0.490.240.460.800.470.52
Multithreading Testfailedfailedfailedfailedfailedfailed
All Tests0.690.0881.10.790.890.40

DataNucleus with MySQL server has failed in 2 tests (see exceptions). Hibernate with SQLite embedded has failed in 3 tests (see exceptions).

The results above show that in general DataNucleus with MySQL server is more efficient than Hibernate with SQLite embedded in deleting JPA entity objects from the database. Comparing the normalized speed of Hibernate with SQLite embedded database (0.40) to the normalized speed of DataNucleus with MySQL database server (0.89) reveals that in these tests, DataNucleus with MySQL server is 2.2 times faster than Hibernate with SQLite embedded.

A huge performance gap has been detected when using JPA element collections with small transaction size. Comparing the normalized speed of Hibernate with SQLite embedded database (0.0007) to the normalized speed of DataNucleus with MySQL database server (0.17) reveals that in that case, DataNucleus with MySQL server is 243 times faster than Hibernate with SQLite embedded.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 DataNucleus
MySQL server
Hibernate
SQLite embedded
DataNucleus
MySQL server
Hibernate
SQLite embedded
DataNucleus
MySQL server
Hibernate
SQLite embedded
Basic Person Test2.40.633.10.812.70.72
Element Collection Test1.50.0920.470.690.990.19
Inheritance Test1.40.632.90.912.10.77
Indexing Test1.40.423.80.962.60.69
Graph (Binary Tree) Test1.20.331.40.771.30.55
Multithreading Test2.4failed5.1failed3.5failed
All Tests1.70.422.60.862.10.62

The results above show that in general DataNucleus with MySQL server is much more efficient than Hibernate with SQLite embedded in performing JPA database operations. Comparing the normalized speed of Hibernate with SQLite embedded database (0.62) to the normalized speed of DataNucleus with MySQL database server (2.1) reveals that in these tests, DataNucleus with MySQL server is 3.4 times faster than Hibernate with SQLite embedded.

A huge performance gap has been detected when using JPA element collections with small transaction/retrieval size. Comparing the normalized speed of Hibernate with SQLite embedded database (0.092) to the normalized speed of DataNucleus with MySQL database server (1.5) reveals that in that case, DataNucleus with MySQL server is 16.3 times faster than Hibernate with SQLite embedded.

Other Head to Head DBMS/JPA Comparisons