Choose benchmark test, operation and batch mode:

When one or more of the All filters is selected - only average normalized results are displayed. Please read Running and Results for more details.

Speed comparison of JPA database persistence operations per second (higher is better)

 Derby
embedded
H2
embedded
HSQLDB
embedded
SQLite
embedded
DB4O
embedded
ObjectDB
embedded
Derby
server
H2
server
MySQL
server
PostgreSQL
server
ObjectDB
server
DataNucleus4,21117,11118,857 failed 2,3794,8913,0598,797 
EclipseLink4,53614,83615,92049.2  2,9885,0033,53415,567 
Hibernate5,12618,05718,331failed  3,4043,3463,64815,524 
OpenJPA4,27616,76313,134   2,9563,7863,52511,438 
ObjectDB     48,982    37,530

Performance comparison chart - The Y-Axis represents normalized score in logarithmic scale - higher is better:
JPA performance benchmark comparision Hibernate, EclipseLink, OpenJPA, DataNucleus, ObjectDB

Performance comparison chart - The Y-Axis represents normalized score in linear scale - higher is better:
JPA performance benchmark comparision Hibernate, EclipseLink, OpenJPA, DataNucleus, ObjectDB

Best and Worst JPA/Database Performer in this comparison

The Most Efficient (the Fastest):

1. ObjectDB embedded100
2. ObjectDB server76.6
3. DataNucleus with HSQLDB embedded38.5
4. Hibernate with HSQLDB embedded37.4
5. Hibernate with H2 embedded36.9
6. DataNucleus with H2 embedded34.9
7. OpenJPA with H2 embedded34.2
8. EclipseLink with HSQLDB embedded32.5
9. EclipseLink with PostgreSQL server31.8
10. Hibernate with PostgreSQL server31.7
11. EclipseLink with H2 embedded30.3
12. OpenJPA with HSQLDB embedded26.8
13. OpenJPA with PostgreSQL server23.4
14. DataNucleus with PostgreSQL server18.0
15. Hibernate with Derby embedded10.5
16. EclipseLink with H2 server10.2
17. DataNucleus with H2 server10.0

The Least Efficient (the Slowest):

18. EclipseLink with Derby embedded9.3
19. OpenJPA with Derby embedded8.7
20. DataNucleus with Derby embedded8.6
21. OpenJPA with H2 server7.7
22. Hibernate with MySQL server7.4
23. EclipseLink with MySQL server7.2
24. OpenJPA with MySQL server7.2
25. Hibernate with Derby server6.9
26. Hibernate with H2 server6.8
27. DataNucleus with MySQL server6.2
28. EclipseLink with Derby server6.1
29. OpenJPA with Derby server6.0
30. DataNucleus with Derby server4.9
31. EclipseLink with SQLite embedded0.10
32. DataNucleus with DB4O embedded0.0000
33. Hibernate with SQLite embedded0.0000

Problems (Exceptions) in these tests

  • Hibernate with SQLite embedded
    javax.persistence.PersistenceException: org.hibernate.TransactionException: JDBC begin failed: 
    	at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1214)
    	at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1147)
    	at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:1224)
    	at org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:63)
    	at org.jpab.Test.persist(Test.java:210)
    	at org.jpab.Test.persist(Test.java:200)
    	at org.jpab.Runner$PersistAction.run0(Runner.java:538)
    	at org.jpab.Runner$TestAction.run(Runner.java:517)
    	at java.lang.Thread.run(Thread.java:662)
    Caused by: org.hibernate.TransactionException: JDBC begin failed: 
    	at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:92)
    	at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1473)
    	at org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:60)
    	... 5 more
    Caused by: java.sql.SQLException: SQL logic error or missing database
    	at org.sqlite.DB.throwex(DB.java:288)
    	at org.sqlite.DB.exec(DB.java:68)
    	at org.sqlite.Conn.setAutoCommit(Conn.java:159)
    	at com.mchange.v2.c3p0.impl.NewProxyConnection.setAutoCommit(NewProxyConnection.java:881)
    	at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:87)
    	... 7 more
    
  • DataNucleus with DB4O embedded
    com.db4o.ext.DatabaseClosedException
    	at com.db4o.internal.ObjectContainerBase.checkClosed(ObjectContainerBase.java:310)
    	at com.db4o.internal.ObjectContainerBase.checkTransaction(ObjectContainerBase.java:338)
    	at com.db4o.internal.ObjectContainerBase.queryByExample(ObjectContainerBase.java:806)
    	at com.db4o.internal.ExternalObjectContainer.queryByExample(ExternalObjectContainer.java:68)
    	at org.datanucleus.store.db4o.valuegenerator.DB4OIncrementGenerator.reserveBlock(DB4OIncrementGenerator.java:142)
    	at org.datanucleus.store.valuegenerator.AbstractGenerator.reserveBlock(AbstractGenerator.java:305)
    	at org.datanucleus.store.db4o.valuegenerator.DB4OIncrementGenerator.obtainGenerationBlock(DB4OIncrementGenerator.java:97)
    	at org.datanucleus.store.valuegenerator.AbstractGenerator.obtainGenerationBlock(AbstractGenerator.java:197)
    	at org.datanucleus.store.valuegenerator.AbstractGenerator.next(AbstractGenerator.java:105)
    	at org.datanucleus.store.AbstractStoreManager.getStrategyValueForGenerator(AbstractStoreManager.java:1650)
    	at org.datanucleus.store.AbstractStoreManager.getStrategyValue(AbstractStoreManager.java:1550)
    	at org.datanucleus.state.JDOStateManager.populateStrategyFields(JDOStateManager.java:693)
    	at org.datanucleus.state.JDOStateManager.initialiseForPersistentNew(JDOStateManager.java:368)
    	at org.datanucleus.state.ObjectProviderFactory.newForPersistentNew(ObjectProviderFactory.java:163)
    	at org.datanucleus.ObjectManagerImpl.persistObjectInternal(ObjectManagerImpl.java:1797)
    	at org.datanucleus.ObjectManagerImpl.persistObjectWork(ObjectManagerImpl.java:1647)
    	at org.datanucleus.ObjectManagerImpl.persistObject(ObjectManagerImpl.java:1504)
    	at org.datanucleus.api.jpa.JPAEntityManager.persist(JPAEntityManager.java:535)
    	at org.jpab.Test.persist(Test.java:214)
    	at org.jpab.Test.persist(Test.java:200)
    	at org.jpab.Runner$PersistAction.run0(Runner.java:538)
    	at org.jpab.Runner$TestAction.run(Runner.java:517)
    	at java.lang.Thread.run(Thread.java:662)