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 retrieval 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
DataNucleus69,70974,98950,687 failed 1,57140,06814,62518,166 
EclipseLink19,513112,43361,141failed  4,2827,5623,7663,346 
Hibernate18,18017,57425,1023,972  6,3982,9763,9014,305 
OpenJPA6,5247,20214,459   4592,6861,9341,902 
ObjectDB     704,519    140,413

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 server19.9
3. EclipseLink with H2 embedded16.0
4. DataNucleus with H2 embedded10.6
5. DataNucleus with Derby embedded9.9
6. EclipseLink with HSQLDB embedded8.7
7. DataNucleus with HSQLDB embedded7.2
8. DataNucleus with H2 server5.7
9. Hibernate with HSQLDB embedded3.6
10. EclipseLink with Derby embedded2.8
11. Hibernate with Derby embedded2.6
12. DataNucleus with PostgreSQL server2.6
13. Hibernate with H2 embedded2.5
14. DataNucleus with MySQL server2.1
15. OpenJPA with HSQLDB embedded2.1
16. EclipseLink with H2 server1.1
17. OpenJPA with H2 embedded1.0

The Least Efficient (the Slowest):

18. OpenJPA with Derby embedded0.93
19. Hibernate with Derby server0.91
20. Hibernate with PostgreSQL server0.61
21. EclipseLink with Derby server0.61
22. Hibernate with SQLite embedded0.56
23. Hibernate with MySQL server0.55
24. EclipseLink with MySQL server0.53
25. EclipseLink with PostgreSQL server0.47
26. Hibernate with H2 server0.42
27. OpenJPA with H2 server0.38
28. OpenJPA with MySQL server0.27
29. OpenJPA with PostgreSQL server0.27
30. DataNucleus with Derby server0.22
31. OpenJPA with Derby server0.065
32. DataNucleus with DB4O embedded0.0000
33. EclipseLink with SQLite embedded0.0000

Problems (Exceptions) in these tests

  • EclipseLink with SQLite embedded
    Local Exception Stack: 
    Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.1.1.v20100817-r8050): org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: no such function: MOD
    Error Code: 0
    Call: SELECT ID, CHANGECOUNT, CHILD2_ID, CHILD1_ID FROM NODE WHERE ((MOD(ID, ?) = ?) AND (ID >= ?))
    	bind => [100, 1, 69316]
    Query: ReadAllQuery(referenceClass=Node sql="SELECT ID, CHANGECOUNT, CHILD2_ID, CHILD1_ID FROM NODE WHERE ((MOD(ID, ?) = ?) AND (ID >= ?))")
    	at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:333)
    	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:683)
    	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:526)
    	at org.eclipse.persistence.sessions.server.ServerSession.executeCall(ServerSession.java:529)
    	at org.eclipse.persistence.internal.sessions.IsolatedClientSession.executeCall(IsolatedClientSession.java:133)
    	at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:206)
    	at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:192)
    	at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:263)
    	at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:644)
    	at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRowsFromTable(ExpressionQueryMechanism.java:2537)
    	at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRows(ExpressionQueryMechanism.java:2496)
    	at org.eclipse.persistence.queries.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:407)
    	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.node.NodeTest.retireveEntities(NodeTest.java:130)
    	at org.jpab.Test.doAction(Test.java:251)
    	at org.jpab.Runner$RetrieveAction.run0(Runner.java:550)
    	at org.jpab.Runner$TestAction.run(Runner.java:517)
    	at java.lang.Thread.run(Thread.java:662)
    Caused by: java.sql.SQLException: no such function: MOD
    	at org.sqlite.DB.throwex(DB.java:288)
    	at org.sqlite.NestedDB.prepare(NestedDB.java:115)
    	at org.sqlite.DB.prepare(DB.java:114)
    	at org.sqlite.PrepStmt.(PrepStmt.java:37)
    	at org.sqlite.Conn.prepareStatement(Conn.java:224)
    	at org.sqlite.Conn.prepareStatement(Conn.java:217)
    	at org.sqlite.Conn.prepareStatement(Conn.java:206)
    	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.prepareStatement(DatabaseAccessor.java:1401)
    	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.prepareStatement(DatabaseAccessor.java:1350)
    	at org.eclipse.persistence.internal.databaseaccess.DatabaseCall.prepareStatement(DatabaseCall.java:652)
    	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:576)
    	... 26 more
    
  • DataNucleus with DB4O embedded
    javax.persistence.PersistenceException: Object "org.jpab.node.Node@538eb7b8" being inserted has id "130003" 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.node.Node@538eb7b8" being inserted has id "130003" 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:3854)
    	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