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 removal 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
DataNucleusfailedfailed27,780 failed failed10,243failedfailed 
EclipseLink11,64452,15857,421failed  11,5299,9327,19034,032 
Hibernate9,96545,87057,850failed  10,31914,8458,19644,052 
OpenJPA12,54534,92039,525   8,02710,5075,90818,312 
ObjectDB     202,118    102,032

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 server50.5
3. Hibernate with HSQLDB embedded28.6
4. EclipseLink with HSQLDB embedded28.4
5. EclipseLink with H2 embedded25.8
6. Hibernate with H2 embedded22.7
7. Hibernate with PostgreSQL server21.8
8. OpenJPA with HSQLDB embedded19.6
9. OpenJPA with H2 embedded17.3
10. EclipseLink with PostgreSQL server16.8
11. DataNucleus with HSQLDB embedded13.7
12. OpenJPA with PostgreSQL server9.1
13. Hibernate with H2 server7.3
14. OpenJPA with Derby embedded6.2
15. EclipseLink with Derby embedded5.8
16. EclipseLink with Derby server5.7
17. OpenJPA with H2 server5.2

The Least Efficient (the Slowest):

18. Hibernate with Derby server5.1
19. DataNucleus with H2 server5.1
20. Hibernate with Derby embedded4.9
21. EclipseLink with H2 server4.9
22. Hibernate with MySQL server4.1
23. OpenJPA with Derby server4.0
24. EclipseLink with MySQL server3.6
25. OpenJPA with MySQL server2.9
26. DataNucleus with Derby embedded0.0000
27. DataNucleus with H2 embedded0.0000
28. DataNucleus with DB4O embedded0.0000
29. DataNucleus with Derby server0.0000
30. DataNucleus with MySQL server0.0000
31. DataNucleus with PostgreSQL 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$RemoveAction.run0(Runner.java:587)
    	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$RemoveAction.run0(Runner.java:587)
    	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 [165,600,000], of class [class java.lang.Integer], from mapping [org.eclipse.persistence.mappings.DirectToFieldMapping[birthDate-->PERSON.BIRTHDATE]] 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$RemoveAction.run0(Runner.java:587)
    	at org.jpab.Runner$TestAction.run(Runner.java:517)
    	at java.lang.Thread.run(Thread.java:662)
    
  • Hibernate with SQLite embedded
    javax.persistence.RollbackException: Error while committing the transaction
    	at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:93)
    	at org.jpab.Test.persist(Test.java:217)
    	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: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: could not insert: [org.jpab.basic.Person]
    	at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1214)
    	at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1147)
    	at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:81)
    	... 5 more
    Caused by: org.hibernate.exception.GenericJDBCException: could not insert: [org.jpab.basic.Person]
    	at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:140)
    	at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:128)
    	at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
    	at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2436)
    	at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2856)
    	at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:79)
    	at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273)
    	at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:265)
    	at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:184)
    	at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
    	at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
    	at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)
    	at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:383)
    	at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:133)
    	at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:76)
    	... 5 more
    Caused by: java.sql.SQLException: PRIMARY KEY must be unique
    	at org.sqlite.DB.throwex(DB.java:288)
    	at org.sqlite.DB.executeBatch(DB.java:236)
    	at org.sqlite.PrepStmt.executeBatch(PrepStmt.java:82)
    	at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewProxyPreparedStatement.java:1723)
    	at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
    	at org.hibernate.jdbc.BatchingBatcher.addToBatch(BatchingBatcher.java:56)
    	at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2416)
    	... 16 more
    
  • DataNucleus with DB4O embedded
    javax.persistence.PersistenceException: Object "org.jpab.basic.Person@7d6b4be5" being inserted has id "13" yet an object with this id already exists in the datastore!
    	at org.datanucleus.api.jpa.NucleusJPAHelper.getJPAExceptionForNucleusException(NucleusJPAHelper.java:302)
    	at org.datanucleus.api.jpa.JPAEntityTransaction.commit(JPAEntityTransaction.java:122)
    	at org.jpab.Test.persist(Test.java:217)
    	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.datanucleus.exceptions.NucleusUserException: Object "org.jpab.basic.Person@7d6b4be5" being inserted has id "13" yet an object with this id already exists in the datastore!
    	at org.datanucleus.store.db4o.DB4OPersistenceHandler.insertObject(DB4OPersistenceHandler.java:140)
    	at org.datanucleus.state.JDOStateManager.internalMakePersistent(JDOStateManager.java:2371)
    	at org.datanucleus.state.JDOStateManager.flush(JDOStateManager.java:3803)
    	at org.datanucleus.ObjectManagerImpl.flushInternalWithOrdering(ObjectManagerImpl.java:3832)
    	at org.datanucleus.ObjectManagerImpl.flushInternal(ObjectManagerImpl.java:3755)
    	at org.datanucleus.ObjectManagerImpl.flush(ObjectManagerImpl.java:3701)
    	at org.datanucleus.ObjectManagerImpl.preCommit(ObjectManagerImpl.java:4084)
    	at org.datanucleus.ObjectManagerImpl$2.transactionPreCommit(ObjectManagerImpl.java:398)
    	at org.datanucleus.TransactionImpl.internalPreCommit(TransactionImpl.java:370)
    	at org.datanucleus.TransactionImpl.commit(TransactionImpl.java:259)
    	at org.datanucleus.api.jpa.JPAEntityTransaction.commit(JPAEntityTransaction.java:103)
    	... 5 more
    
  • 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$RemoveAction.run0(Runner.java:587)
    	at org.jpab.Runner$TestAction.run(Runner.java:517)
    	at java.lang.Thread.run(Thread.java:662)
    
  • DataNucleus with MySQL 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$RemoveAction.run0(Runner.java:587)
    	at org.jpab.Runner$TestAction.run(Runner.java:517)
    	at java.lang.Thread.run(Thread.java:662)
    
  • DataNucleus with PostgreSQL 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$RemoveAction.run0(Runner.java:587)
    	at org.jpab.Runner$TestAction.run(Runner.java:517)
    	at java.lang.Thread.run(Thread.java:662)