Compare with

Comparison of EclipseLink 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
 EclipseLink
MySQL server
Hibernate
SQLite embedded
EclipseLink
MySQL server
Hibernate
SQLite embedded
EclipseLink
MySQL server
Hibernate
SQLite embedded
Basic Person Test3.60.0831.51.02.60.55
Element Collection Test1.50.0670.690.691.10.38
Inheritance Test3.50.0801.40.992.40.54
Indexing Test5.30.0982.51.03.90.55
Graph (Binary Tree) Test1.70.271.30.961.50.61
Multithreading Test7.2failed2.4failed4.8failed
All Tests3.80.121.60.932.70.53

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

The results above show that in general EclipseLink 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 EclipseLink with MySQL database server (2.7) reveals that in these tests, EclipseLink with MySQL server is 5.1 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 EclipseLink with MySQL database server (5.3) reveals that in that case, EclipseLink with MySQL server is 54.1 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
 EclipseLink
MySQL server
Hibernate
SQLite embedded
EclipseLink
MySQL server
Hibernate
SQLite embedded
EclipseLink
MySQL server
Hibernate
SQLite embedded
Basic Person Test0.431.815.51.38.01.5
Element Collection Test0.160.00081.4failed0.780.0008
Inheritance Test0.392.417.61.49.01.9
Indexing Test0.431.916.62.38.52.1
Graph (Binary Tree) Test0.530.560.760.880.650.72
Multithreading Test0.19failed11.0failed5.6failed
All Tests0.351.310.51.55.41.4

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

The results above show that in general EclipseLink with MySQL server is much 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 EclipseLink with MySQL database server (5.4) reveals that in these tests, EclipseLink with MySQL server is 3.9 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 EclipseLink with MySQL database server (0.16) reveals that in that case, EclipseLink with MySQL server is 200 times faster than Hibernate with SQLite embedded.

On the other hand, EclipseLink with MySQL server is slower, for instance, when using class inheritance in the object model with small retrieval size. Comparing the normalized speed of EclipseLink with MySQL database server (0.39) to the normalized speed of Hibernate with SQLite embedded database (2.4) reveals that in that case, EclipseLink with MySQL server is 6.2 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
 EclipseLink
MySQL server
Hibernate
SQLite embedded
EclipseLink
MySQL server
Hibernate
SQLite embedded
EclipseLink
MySQL server
Hibernate
SQLite embedded
Basic Person Test1.51.10.440.220.950.65
Element Collection Test1.40.390.43failed0.920.39
Inheritance Test1.10.530.610.280.860.40
Indexing Test0.260.00110.520.430.390.21
Multithreading Test1.9failed0.72failed1.3failed
All Tests1.20.500.540.310.880.42

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

The results above show that in general EclipseLink with MySQL server is 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 EclipseLink with MySQL database server (0.88) reveals that in these tests, EclipseLink with MySQL server is 2.1 times faster than Hibernate with SQLite embedded.

A huge performance gap has been detected when using database indexes with small retrieval size. Comparing the normalized speed of Hibernate with SQLite embedded database (0.0011) to the normalized speed of EclipseLink with MySQL database server (0.26) reveals that in that case, EclipseLink with MySQL server is 236 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
 EclipseLink
MySQL server
Hibernate
SQLite embedded
EclipseLink
MySQL server
Hibernate
SQLite embedded
EclipseLink
MySQL server
Hibernate
SQLite embedded
Basic Person Test0.390.0761.80.651.10.37
Element Collection Test0.230.00221.4failed0.830.0022
Inheritance Test0.420.0792.60.971.50.53
Indexing Test0.460.0573.10.541.80.30
Graph (Binary Tree) Test0.670.260.410.420.540.34
Multithreading Test0.48failed2.6failed1.5failed
All Tests0.440.0942.00.651.20.34

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

The results above show that in general EclipseLink with MySQL server is much 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 EclipseLink with MySQL database server (1.2) reveals that in these tests, EclipseLink with MySQL server is 3.5 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 EclipseLink with MySQL database server (0.23) reveals that in that case, EclipseLink with MySQL server is 105 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
 EclipseLink
MySQL server
Hibernate
SQLite embedded
EclipseLink
MySQL server
Hibernate
SQLite embedded
EclipseLink
MySQL server
Hibernate
SQLite embedded
Basic Person Test0.350.0611.70.911.00.49
Element Collection Test0.110.00070.51failed0.310.0007
Inheritance Test0.290.0581.60.900.940.48
Indexing Test0.460.0791.90.541.20.31
Graph (Binary Tree) Test0.540.240.490.800.510.52
Multithreading Test0.31failed3.6failed1.9failed
All Tests0.340.0881.60.790.980.40

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

The results above show that in general EclipseLink 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 EclipseLink with MySQL database server (0.98) reveals that in these tests, EclipseLink with MySQL server is 2.4 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 EclipseLink with MySQL database server (0.11) reveals that in that case, EclipseLink with MySQL server is 157 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
 EclipseLink
MySQL server
Hibernate
SQLite embedded
EclipseLink
MySQL server
Hibernate
SQLite embedded
EclipseLink
MySQL server
Hibernate
SQLite embedded
Basic Person Test1.30.634.20.812.70.72
Element Collection Test0.690.0920.890.690.790.19
Inheritance Test1.10.634.80.912.90.77
Indexing Test1.40.424.90.963.20.69
Graph (Binary Tree) Test0.850.330.730.770.790.55
Multithreading Test2.0failed4.0failed3.0failed
All Tests1.20.423.30.862.30.62

The results above show that in general EclipseLink 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 EclipseLink with MySQL database server (2.3) reveals that in these tests, EclipseLink with MySQL server is 3.7 times faster than Hibernate with SQLite embedded.

A large 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 EclipseLink with MySQL database server (0.69) reveals that in that case, EclipseLink with MySQL server is 7.5 times faster than Hibernate with SQLite embedded.

Other Head to Head DBMS/JPA Comparisons