Compare with

Comparison of EclipseLink with HSQLDB embedded vs EclipseLink 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
 EclipseLink
HSQLDB embedded
EclipseLink
PostgreSQL server
EclipseLink
HSQLDB embedded
EclipseLink
PostgreSQL server
EclipseLink
HSQLDB embedded
EclipseLink
PostgreSQL server
Basic Person Test27.17.317.24.222.25.8
Element Collection Test17.23.18.21.912.72.5
Inheritance Test26.76.911.95.019.35.9
Indexing Test30.610.018.66.824.68.4
Graph (Binary Tree) Test20.03.515.93.318.03.4
Multithreading Test32.531.811.414.522.023.1
All Tests25.710.413.96.019.88.2

The results above show that in general EclipseLink with HSQLDB embedded is more efficient than EclipseLink with PostgreSQL server in persisting JPA entity objects to the database. Comparing the normalized speed of EclipseLink with PostgreSQL database server (8.2) to the normalized speed of EclipseLink with HSQLDB embedded database (19.8) reveals that in these tests, EclipseLink with HSQLDB embedded is 2.4 times faster than EclipseLink with PostgreSQL server.

A large performance gap has been detected when using graphs of objects with small transaction size. Comparing the normalized speed of EclipseLink with PostgreSQL database server (3.5) to the normalized speed of EclipseLink with HSQLDB embedded database (20.0) reveals that in that case, EclipseLink with HSQLDB embedded is 5.7 times faster than EclipseLink with PostgreSQL server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
HSQLDB embedded
EclipseLink
PostgreSQL server
EclipseLink
HSQLDB embedded
EclipseLink
PostgreSQL server
EclipseLink
HSQLDB embedded
EclipseLink
PostgreSQL server
Basic Person Test24.46.836.017.230.212.0
Element Collection Test14.90.02619.10.02017.00.023
Inheritance Test22.86.040.019.731.412.9
Indexing Test20.75.638.719.529.712.6
Graph (Binary Tree) Test8.70.4714.20.6111.40.54
Multithreading Test24.213.528.027.826.120.6
All Tests19.35.429.314.124.39.8

The results above show that in general EclipseLink with HSQLDB embedded is more efficient than EclipseLink with PostgreSQL server in retrieving JPA entity objects from the database. Comparing the normalized speed of EclipseLink with PostgreSQL database server (9.8) to the normalized speed of EclipseLink with HSQLDB embedded database (24.3) reveals that in these tests, EclipseLink with HSQLDB embedded is 2.5 times faster than EclipseLink with PostgreSQL server.

A huge performance gap has been detected when using JPA element collections with large retrieval size. Comparing the normalized speed of EclipseLink with PostgreSQL database server (0.020) to the normalized speed of EclipseLink with HSQLDB embedded database (19.1) reveals that in that case, EclipseLink with HSQLDB embedded is 955 times faster than EclipseLink with PostgreSQL server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
HSQLDB embedded
EclipseLink
PostgreSQL server
EclipseLink
HSQLDB embedded
EclipseLink
PostgreSQL server
EclipseLink
HSQLDB embedded
EclipseLink
PostgreSQL server
Basic Person Test2.955.50.887.81.931.6
Element Collection Test3.215.41.40.0282.37.7
Inheritance Test2.654.91.111.51.933.2
Indexing Test21.50.07733.310.027.45.1
Multithreading Test1.155.30.5212.00.8233.7
All Tests6.336.27.48.36.922.3

The results above show that in general EclipseLink with PostgreSQL server is much more efficient than EclipseLink with HSQLDB embedded in executing the tested JPA queries. Comparing the normalized speed of EclipseLink with HSQLDB embedded database (6.9) to the normalized speed of EclipseLink with PostgreSQL database server (22.3) reveals that in these tests, EclipseLink with PostgreSQL server is 3.2 times faster than EclipseLink with HSQLDB embedded.

A huge performance gap has been detected when using multithreading with small retrieval size. Comparing the normalized speed of EclipseLink with HSQLDB embedded database (1.1) to the normalized speed of EclipseLink with PostgreSQL database server (55.3) reveals that in that case, EclipseLink with PostgreSQL server is 50.3 times faster than EclipseLink with HSQLDB embedded.

On the other hand, EclipseLink with PostgreSQL server is slower, for instance, when using database indexes with small retrieval size. Comparing the normalized speed of EclipseLink with PostgreSQL database server (0.077) to the normalized speed of EclipseLink with HSQLDB embedded database (21.5) reveals that in that case, EclipseLink with PostgreSQL server is 279 times slower than EclipseLink with HSQLDB embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
HSQLDB embedded
EclipseLink
PostgreSQL server
EclipseLink
HSQLDB embedded
EclipseLink
PostgreSQL server
EclipseLink
HSQLDB embedded
EclipseLink
PostgreSQL server
Basic Person Test17.96.27.04.112.55.1
Element Collection Test14.60.0808.30.02811.40.054
Inheritance Test16.26.49.76.113.06.2
Indexing Test12.06.56.87.09.46.8
Graph (Binary Tree) Test4.70.903.40.504.00.70
Multithreading Test24.436.04.49.114.422.5
All Tests15.09.36.64.510.86.9

The results above show that in general EclipseLink with HSQLDB embedded is more efficient than EclipseLink with PostgreSQL server in updating JPA entity objects in the database.

A huge performance gap has been detected when using JPA element collections with large transaction size. Comparing the normalized speed of EclipseLink with PostgreSQL database server (0.028) to the normalized speed of EclipseLink with HSQLDB embedded database (8.3) reveals that in that case, EclipseLink with HSQLDB embedded is 296 times faster than EclipseLink with PostgreSQL server.

On the other hand, EclipseLink with HSQLDB embedded is slower, for instance, when using multithreading with large transaction size. Comparing the normalized speed of EclipseLink with HSQLDB embedded database (4.4) to the normalized speed of EclipseLink with PostgreSQL database server (9.1) reveals that in that case, EclipseLink with HSQLDB embedded is 2.1 times slower than EclipseLink with PostgreSQL server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
HSQLDB embedded
EclipseLink
PostgreSQL server
EclipseLink
HSQLDB embedded
EclipseLink
PostgreSQL server
EclipseLink
HSQLDB embedded
EclipseLink
PostgreSQL server
Basic Person Test32.35.720.35.726.35.7
Element Collection Test14.30.0256.0stopped10.20.012
Inheritance Test29.25.523.95.426.65.4
Indexing Test55.310.427.110.041.210.2
Graph (Binary Tree) Test6.80.01614.10.01310.40.015
Multithreading Test52.926.328.416.840.621.6
All Tests31.88.020.06.325.97.2

The results above show that in general EclipseLink with HSQLDB embedded is much more efficient than EclipseLink with PostgreSQL server in deleting JPA entity objects from the database. Comparing the normalized speed of EclipseLink with PostgreSQL database server (7.2) to the normalized speed of EclipseLink with HSQLDB embedded database (25.9) reveals that in these tests, EclipseLink with HSQLDB embedded is 3.6 times faster than EclipseLink with PostgreSQL server.

A huge performance gap has been detected when using graphs of objects with large transaction size. Comparing the normalized speed of EclipseLink with PostgreSQL database server (0.013) to the normalized speed of EclipseLink with HSQLDB embedded database (14.1) reveals that in that case, EclipseLink with HSQLDB embedded is 1,085 times faster than EclipseLink with PostgreSQL server.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 EclipseLink
HSQLDB embedded
EclipseLink
PostgreSQL server
EclipseLink
HSQLDB embedded
EclipseLink
PostgreSQL server
EclipseLink
HSQLDB embedded
EclipseLink
PostgreSQL server
Basic Person Test20.916.316.37.818.612.1
Element Collection Test12.83.78.60.4010.72.1
Inheritance Test19.515.917.39.518.412.7
Indexing Test28.06.524.910.726.58.6
Graph (Binary Tree) Test10.01.211.91.111.01.2
Multithreading Test27.032.614.616.020.824.3
All Tests20.113.115.77.817.910.5

The results above show that in general EclipseLink with HSQLDB embedded is more efficient than EclipseLink with PostgreSQL server in performing JPA database operations.

A huge performance gap has been detected when using JPA element collections with large transaction/retrieval size. Comparing the normalized speed of EclipseLink with PostgreSQL database server (0.40) to the normalized speed of EclipseLink with HSQLDB embedded database (8.6) reveals that in that case, EclipseLink with HSQLDB embedded is 21.5 times faster than EclipseLink with PostgreSQL server.

Other Head to Head DBMS/JPA Comparisons