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 update 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
DataNucleusfailedfailedfailed failed failedfailed251182 
EclipseLink8,3688,2049,581failed  2,8493,05119014,123 
Hibernate4,5396,3589,383failed  2,6842,19824611,611 
OpenJPA7,1696,4977,851   2,6922,7642168,724 
ObjectDB     39,231    26,895

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 server68.6
3. EclipseLink with PostgreSQL server36.0
4. Hibernate with PostgreSQL server29.6
5. EclipseLink with HSQLDB embedded24.4
6. Hibernate with HSQLDB embedded23.9
7. OpenJPA with PostgreSQL server22.2
8. EclipseLink with Derby embedded21.3
9. EclipseLink with H2 embedded20.9
10. OpenJPA with HSQLDB embedded20.0
11. OpenJPA with Derby embedded18.3
12. OpenJPA with H2 embedded16.6
13. Hibernate with H2 embedded16.2
14. Hibernate with Derby embedded11.6
15. EclipseLink with H2 server7.8
16. EclipseLink with Derby server7.3
17. OpenJPA with H2 server7.0

The Least Efficient (the Slowest):

18. OpenJPA with Derby server6.9
19. Hibernate with Derby server6.8
20. Hibernate with H2 server5.6
21. DataNucleus with MySQL server0.64
22. Hibernate with MySQL server0.63
23. OpenJPA with MySQL server0.55
24. EclipseLink with MySQL server0.48
25. DataNucleus with PostgreSQL server0.46
26. DataNucleus with Derby embedded0.0000
27. DataNucleus with H2 embedded0.0000
28. DataNucleus with HSQLDB embedded0.0000
29. DataNucleus with DB4O embedded0.0000
30. DataNucleus with Derby server0.0000
31. DataNucleus with H2 server0.0000
32. EclipseLink with SQLite embedded0.0000
33. Hibernate with SQLite embedded0.0000

Problems (Exceptions) in these tests

  • DataNucleus with Derby embedded
    java.lang.IllegalStateException: Table object has not been been initialised : PERSON
    	at org.datanucleus.store.rdbms.table.AbstractTable.assertIsInitialized(AbstractTable.java:656)
    	at org.datanucleus.store.rdbms.table.ClassTable.getMemberMapping(ClassTable.java:2961)
    	at org.datanucleus.store.rdbms.sql.SQLStatementHelper.selectMemberOfSourceInStatement(SQLStatementHelper.java:644)
    	at org.datanucleus.store.rdbms.sql.SQLStatementHelper.selectFetchPlanOfSourceClassInStatement(SQLStatementHelper.java:573)
    	at org.datanucleus.store.rdbms.sql.SQLStatementHelper.selectFetchPlanOfCandidateInStatement(SQLStatementHelper.java:531)
    	at org.datanucleus.store.rdbms.query.QueryToSQLMapper.compileResult(QueryToSQLMapper.java:759)
    	at org.datanucleus.store.rdbms.query.QueryToSQLMapper.compile(QueryToSQLMapper.java:400)
    	at org.datanucleus.store.rdbms.query.JPQLQuery.compileQueryFull(JPQLQuery.java:800)
    	at org.datanucleus.store.rdbms.query.JPQLQuery.compileInternal(JPQLQuery.java:279)
    	at org.datanucleus.store.query.Query.setImplicitParameter(Query.java:800)
    	at org.datanucleus.store.rdbms.query.JPQLQuery.setImplicitParameter(JPQLQuery.java:146)
    	at org.datanucleus.api.jpa.JPAQuery.setParameter(JPAQuery.java:437)
    	at org.datanucleus.api.jpa.JPAQuery.setParameter(JPAQuery.java:57)
    	at org.jpab.Test.retireveEntities(Test.java:380)
    	at org.jpab.Test.doAction(Test.java:251)
    	at org.jpab.Runner$UpdateAction.run0(Runner.java:574)
    	at org.jpab.Runner$TestAction.run(Runner.java:517)
    	at java.lang.Thread.run(Thread.java:662)
    
  • DataNucleus with H2 embedded
    java.lang.IllegalStateException: Table object has not been been initialised : PERSON
    	at org.datanucleus.store.rdbms.table.AbstractTable.assertIsInitialized(AbstractTable.java:656)
    	at org.datanucleus.store.rdbms.table.ClassTable.getMemberMapping(ClassTable.java:2961)
    	at org.datanucleus.store.rdbms.sql.SQLStatementHelper.selectMemberOfSourceInStatement(SQLStatementHelper.java:644)
    	at org.datanucleus.store.rdbms.sql.SQLStatementHelper.selectFetchPlanOfSourceClassInStatement(SQLStatementHelper.java:573)
    	at org.datanucleus.store.rdbms.sql.SQLStatementHelper.selectFetchPlanOfCandidateInStatement(SQLStatementHelper.java:531)
    	at org.datanucleus.store.rdbms.query.QueryToSQLMapper.compileResult(QueryToSQLMapper.java:759)
    	at org.datanucleus.store.rdbms.query.QueryToSQLMapper.compile(QueryToSQLMapper.java:400)
    	at org.datanucleus.store.rdbms.query.JPQLQuery.compileQueryFull(JPQLQuery.java:800)
    	at org.datanucleus.store.rdbms.query.JPQLQuery.compileInternal(JPQLQuery.java:279)
    	at org.datanucleus.store.query.Query.setImplicitParameter(Query.java:800)
    	at org.datanucleus.store.rdbms.query.JPQLQuery.setImplicitParameter(JPQLQuery.java:146)
    	at org.datanucleus.api.jpa.JPAQuery.setParameter(JPAQuery.java:437)
    	at org.datanucleus.api.jpa.JPAQuery.setParameter(JPAQuery.java:57)
    	at org.jpab.Test.retireveEntities(Test.java:380)
    	at org.jpab.Test.doAction(Test.java:251)
    	at org.jpab.Runner$UpdateAction.run0(Runner.java:574)
    	at org.jpab.Runner$TestAction.run(Runner.java:517)
    	at java.lang.Thread.run(Thread.java:662)
    
  • DataNucleus with HSQLDB embedded
    java.lang.IllegalStateException: Table object has not been been initialised : PERSON
    	at org.datanucleus.store.rdbms.table.AbstractTable.assertIsInitialized(AbstractTable.java:656)
    	at org.datanucleus.store.rdbms.table.ClassTable.getMemberMapping(ClassTable.java:2961)
    	at org.datanucleus.store.rdbms.sql.SQLStatementHelper.selectMemberOfSourceInStatement(SQLStatementHelper.java:644)
    	at org.datanucleus.store.rdbms.sql.SQLStatementHelper.selectFetchPlanOfSourceClassInStatement(SQLStatementHelper.java:573)
    	at org.datanucleus.store.rdbms.sql.SQLStatementHelper.selectFetchPlanOfCandidateInStatement(SQLStatementHelper.java:531)
    	at org.datanucleus.store.rdbms.query.QueryToSQLMapper.compileResult(QueryToSQLMapper.java:759)
    	at org.datanucleus.store.rdbms.query.QueryToSQLMapper.compile(QueryToSQLMapper.java:400)
    	at org.datanucleus.store.rdbms.query.JPQLQuery.compileQueryFull(JPQLQuery.java:800)
    	at org.datanucleus.store.rdbms.query.JPQLQuery.compileInternal(JPQLQuery.java:279)
    	at org.datanucleus.store.query.Query.setImplicitParameter(Query.java:800)
    	at org.datanucleus.store.rdbms.query.JPQLQuery.setImplicitParameter(JPQLQuery.java:146)
    	at org.datanucleus.api.jpa.JPAQuery.setParameter(JPAQuery.java:437)
    	at org.datanucleus.api.jpa.JPAQuery.setParameter(JPAQuery.java:57)
    	at org.jpab.Test.retireveEntities(Test.java:380)
    	at org.jpab.Test.doAction(Test.java:251)
    	at org.jpab.Runner$UpdateAction.run0(Runner.java:574)
    	at org.jpab.Runner$TestAction.run(Runner.java:517)
    	at java.lang.Thread.run(Thread.java:662)
    
  • EclipseLink with SQLite embedded
    Local Exception Stack: 
    Exception [EclipseLink-3002] (Eclipse Persistence Services - 2.1.1.v20100817-r8050): org.eclipse.persistence.exceptions.ConversionException
    Exception Description: The object [-1,389,600,000], of class [class java.lang.Integer], from mapping [org.eclipse.persistence.mappings.DirectToFieldMapping[lastLoginDate-->PERSON.LASTLOGINDATE]] with descriptor [RelationalDescriptor(org.jpab.basic.Person --> [DatabaseTable(PERSON)])], could not be converted to [class java.util.Date].
    	at org.eclipse.persistence.exceptions.ConversionException.couldNotBeConverted(ConversionException.java:71)
    	at org.eclipse.persistence.internal.helper.ConversionManager.convertObjectToUtilDate(ConversionManager.java:761)
    	at org.eclipse.persistence.internal.helper.ConversionManager.convertObject(ConversionManager.java:101)
    	at org.eclipse.persistence.internal.databaseaccess.DatasourcePlatform.convertObject(DatasourcePlatform.java:157)
    	at org.eclipse.persistence.mappings.converters.TypeConversionConverter.convertDataValueToObjectValue(TypeConversionConverter.java:119)
    	at org.eclipse.persistence.mappings.foundation.AbstractDirectMapping.getAttributeValue(AbstractDirectMapping.java:675)
    	at org.eclipse.persistence.mappings.foundation.AbstractDirectMapping.valueFromRow(AbstractDirectMapping.java:1263)
    	at org.eclipse.persistence.mappings.foundation.AbstractDirectMapping.buildCloneFromRow(AbstractDirectMapping.java:1234)
    	at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildAttributesIntoWorkingCopyClone(ObjectBuilder.java:1338)
    	at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildWorkingCopyCloneFromRow(ObjectBuilder.java:1466)
    	at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObjectInUnitOfWork(ObjectBuilder.java:558)
    	at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:502)
    	at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:454)
    	at org.eclipse.persistence.queries.ObjectLevelReadQuery.buildObject(ObjectLevelReadQuery.java:721)
    	at org.eclipse.persistence.queries.ReadAllQuery.registerResultInUnitOfWork(ReadAllQuery.java:723)
    	at org.eclipse.persistence.queries.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:420)
    	at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:1074)
    	at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:736)
    	at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1034)
    	at org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:380)
    	at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1112)
    	at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2909)
    	at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1291)
    	at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1273)
    	at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1247)
    	at org.eclipse.persistence.internal.jpa.EJBQueryImpl.executeReadQuery(EJBQueryImpl.java:479)
    	at org.eclipse.persistence.internal.jpa.EJBQueryImpl.getResultList(EJBQueryImpl.java:714)
    	at org.jpab.Test.retireveEntities(Test.java:382)
    	at org.jpab.Test.doAction(Test.java:251)
    	at org.jpab.Runner$UpdateAction.run0(Runner.java:574)
    	at org.jpab.Runner$TestAction.run(Runner.java:517)
    	at java.lang.Thread.run(Thread.java:662)
    
  • 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)
    
  • DataNucleus with Derby server
    java.lang.IllegalStateException: Table object has not been been initialised : PERSON
    	at org.datanucleus.store.rdbms.table.AbstractTable.assertIsInitialized(AbstractTable.java:656)
    	at org.datanucleus.store.rdbms.table.ClassTable.getMemberMapping(ClassTable.java:2961)
    	at org.datanucleus.store.rdbms.sql.SQLStatementHelper.selectMemberOfSourceInStatement(SQLStatementHelper.java:644)
    	at org.datanucleus.store.rdbms.sql.SQLStatementHelper.selectFetchPlanOfSourceClassInStatement(SQLStatementHelper.java:573)
    	at org.datanucleus.store.rdbms.sql.SQLStatementHelper.selectFetchPlanOfCandidateInStatement(SQLStatementHelper.java:531)
    	at org.datanucleus.store.rdbms.query.QueryToSQLMapper.compileResult(QueryToSQLMapper.java:759)
    	at org.datanucleus.store.rdbms.query.QueryToSQLMapper.compile(QueryToSQLMapper.java:400)
    	at org.datanucleus.store.rdbms.query.JPQLQuery.compileQueryFull(JPQLQuery.java:800)
    	at org.datanucleus.store.rdbms.query.JPQLQuery.compileInternal(JPQLQuery.java:279)
    	at org.datanucleus.store.query.Query.setImplicitParameter(Query.java:800)
    	at org.datanucleus.store.rdbms.query.JPQLQuery.setImplicitParameter(JPQLQuery.java:146)
    	at org.datanucleus.api.jpa.JPAQuery.setParameter(JPAQuery.java:437)
    	at org.datanucleus.api.jpa.JPAQuery.setParameter(JPAQuery.java:57)
    	at org.jpab.Test.retireveEntities(Test.java:380)
    	at org.jpab.Test.doAction(Test.java:251)
    	at org.jpab.Runner$UpdateAction.run0(Runner.java:574)
    	at org.jpab.Runner$TestAction.run(Runner.java:517)
    	at java.lang.Thread.run(Thread.java:662)
    
  • DataNucleus with H2 server
    java.lang.IllegalStateException: Table object has not been been initialised : PERSON
    	at org.datanucleus.store.rdbms.table.AbstractTable.assertIsInitialized(AbstractTable.java:656)
    	at org.datanucleus.store.rdbms.table.ClassTable.getMemberMapping(ClassTable.java:2961)
    	at org.datanucleus.store.rdbms.sql.SQLStatementHelper.selectMemberOfSourceInStatement(SQLStatementHelper.java:644)
    	at org.datanucleus.store.rdbms.sql.SQLStatementHelper.selectFetchPlanOfSourceClassInStatement(SQLStatementHelper.java:573)
    	at org.datanucleus.store.rdbms.sql.SQLStatementHelper.selectFetchPlanOfCandidateInStatement(SQLStatementHelper.java:531)
    	at org.datanucleus.store.rdbms.query.QueryToSQLMapper.compileResult(QueryToSQLMapper.java:759)
    	at org.datanucleus.store.rdbms.query.QueryToSQLMapper.compile(QueryToSQLMapper.java:400)
    	at org.datanucleus.store.rdbms.query.JPQLQuery.compileQueryFull(JPQLQuery.java:800)
    	at org.datanucleus.store.rdbms.query.JPQLQuery.compileInternal(JPQLQuery.java:279)
    	at org.datanucleus.store.query.Query.setImplicitParameter(Query.java:800)
    	at org.datanucleus.store.rdbms.query.JPQLQuery.setImplicitParameter(JPQLQuery.java:146)
    	at org.datanucleus.api.jpa.JPAQuery.setParameter(JPAQuery.java:437)
    	at org.datanucleus.api.jpa.JPAQuery.setParameter(JPAQuery.java:57)
    	at org.jpab.Test.retireveEntities(Test.java:380)
    	at org.jpab.Test.doAction(Test.java:251)
    	at org.jpab.Runner$UpdateAction.run0(Runner.java:574)
    	at org.jpab.Runner$TestAction.run(Runner.java:517)
    	at java.lang.Thread.run(Thread.java:662)