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 query 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
DataNucleus33.32.61.0 failed 18.72.25.330.4 
EclipseLink4,7878,18113,5810.51  1,5751,86316548.5 
Hibernate3,3694,1846,2410.71  1,2901,10227431.5 
OpenJPA4,4158,7089,692   1,3912,399197failed 
ObjectDB     63,038    9,139

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. EclipseLink with HSQLDB embedded21.5
3. OpenJPA with HSQLDB embedded15.4
4. ObjectDB server14.5
5. OpenJPA with H2 embedded13.8
6. EclipseLink with H2 embedded13.0
7. Hibernate with HSQLDB embedded9.9
8. EclipseLink with Derby embedded7.6
9. OpenJPA with Derby embedded7.0
10. Hibernate with H2 embedded6.6
11. Hibernate with Derby embedded5.3
12. OpenJPA with H2 server3.8
13. EclipseLink with H2 server3.0
14. EclipseLink with Derby server2.5
15. OpenJPA with Derby server2.2
16. Hibernate with Derby server2.0
17. Hibernate with H2 server1.7

The Least Efficient (the Slowest):

18. Hibernate with MySQL server0.44
19. OpenJPA with MySQL server0.31
20. EclipseLink with MySQL server0.26
21. EclipseLink with PostgreSQL server0.077
22. DataNucleus with Derby embedded0.053
23. Hibernate with PostgreSQL server0.050
24. DataNucleus with PostgreSQL server0.048
25. DataNucleus with Derby server0.030
26. DataNucleus with MySQL server0.0084
27. DataNucleus with H2 embedded0.0041
28. DataNucleus with H2 server0.0036
29. DataNucleus with HSQLDB embedded0.0016
30. Hibernate with SQLite embedded0.0011
31. EclipseLink with SQLite embedded0.0008
32. DataNucleus with DB4O embedded0.0000
33. OpenJPA with PostgreSQL server0.0000

Problems (Exceptions) in these tests

  • DataNucleus with DB4O embedded
    javax.persistence.PersistenceException: Compiled filter contains method "matches" which is not currently supported by SODA queries
    	at org.datanucleus.api.jpa.NucleusJPAHelper.getJPAExceptionForNucleusException(NucleusJPAHelper.java:325)
    	at org.datanucleus.api.jpa.JPAQuery.getResultList(JPAQuery.java:202)
    	at org.jpab.Test.query(Test.java:315)
    	at org.jpab.Runner$QueryAction.run0(Runner.java:562)
    	at org.jpab.Runner$TestAction.run(Runner.java:517)
    	at java.lang.Thread.run(Thread.java:662)
    Caused by: org.datanucleus.exceptions.NucleusException: Compiled filter contains method "matches" which is not currently supported by SODA queries
    	at org.datanucleus.store.db4o.query.QueryToSODAMapper.processInvokeExpression(QueryToSODAMapper.java:576)
    	at org.datanucleus.query.evaluator.AbstractExpressionEvaluator.compilePrimaryExpression(AbstractExpressionEvaluator.java:200)
    	at org.datanucleus.query.evaluator.AbstractExpressionEvaluator.compileUnaryExpression(AbstractExpressionEvaluator.java:169)
    	at org.datanucleus.query.evaluator.AbstractExpressionEvaluator.compileAdditiveMultiplicativeExpression(AbstractExpressionEvaluator.java:148)
    	at org.datanucleus.query.evaluator.AbstractExpressionEvaluator.compileRelationalExpression(AbstractExpressionEvaluator.java:123)
    	at org.datanucleus.query.evaluator.AbstractExpressionEvaluator.compileOrAndExpression(AbstractExpressionEvaluator.java:65)
    	at org.datanucleus.query.evaluator.AbstractExpressionEvaluator.evaluate(AbstractExpressionEvaluator.java:46)
    	at org.datanucleus.query.expression.Expression.evaluate(Expression.java:335)
    	at org.datanucleus.store.db4o.query.QueryToSODAMapper.compile(QueryToSODAMapper.java:95)
    	at org.datanucleus.store.db4o.query.JPQLQuery.createSODAQuery(JPQLQuery.java:215)
    	at org.datanucleus.store.db4o.query.JPQLQuery.performExecute(JPQLQuery.java:115)
    	at org.datanucleus.store.query.Query.executeQuery(Query.java:1791)
    	at org.datanucleus.store.query.Query.executeWithMap(Query.java:1694)
    	at org.datanucleus.api.jpa.JPAQuery.getResultList(JPAQuery.java:185)
    	... 4 more
    
  • OpenJPA with PostgreSQL server
     org.apache.openjpa.persistence.PersistenceException: ERROR: invalid escape string
      Hint: Escape string must be empty or one character. {prepstmnt 1249435131 SELECT t0.id, t0.birthDate, t0.city, t0.country, t0.email, t0.firstName, t0.joinDate, t0.lastLoginDate, t0.lastName, t0.loginCount, t0.middleName, t0.phone, t0.state, t0.street, t0.zip FROM IndexedPerson t0 WHERE (t0.lastName LIKE ? ESCAPE '\\') [params=?]} [code=0, state=22025]
    FailedObject: SELECT o FROM IndexedPerson o WHERE o.lastName LIKE :pattern [java.lang.String]
    	at org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:4871)
    	at org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:4831)
    	at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:136)
    	at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:118)
    	at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:70)
    	at org.apache.openjpa.jdbc.kernel.SelectResultObjectProvider.handleCheckedException(SelectResultObjectProvider.java:155)
    	at org.apache.openjpa.lib.rop.EagerResultList.(EagerResultList.java:40)
    	at org.apache.openjpa.kernel.QueryImpl.toResult(QueryImpl.java:1251)
    	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:1007)
    	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:863)
    	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:794)
    	at org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:542)
    	at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:315)
    	at org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:331)
    	at org.jpab.Test.query(Test.java:315)
    	at org.jpab.Runner$QueryAction.run0(Runner.java:562)
    	at org.jpab.Runner$TestAction.run(Runner.java:517)
    	at java.lang.Thread.run(Thread.java:662)
    Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: ERROR: invalid escape string
      Hint: Escape string must be empty or one character. {prepstmnt 1249435131 SELECT t0.id, t0.birthDate, t0.city, t0.country, t0.email, t0.firstName, t0.joinDate, t0.lastLoginDate, t0.lastName, t0.loginCount, t0.middleName, t0.phone, t0.state, t0.street, t0.zip FROM IndexedPerson t0 WHERE (t0.lastName LIKE ? ESCAPE '\\') [params=?]} [code=0, state=22025]
    	at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:281)
    	at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:265)
    	at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$700(LoggingConnectionDecorator.java:72)
    	at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeQuery(LoggingConnectionDecorator.java:1183)
    	at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:284)
    	at org.apache.openjpa.jdbc.sql.PostgresDictionary$PostgresPreparedStatement.executeQuery(PostgresDictionary.java:1012)
    	at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:284)
    	at org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement.executeQuery(JDBCStoreManager.java:1783)
    	at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:274)
    	at org.apache.openjpa.jdbc.sql.SelectImpl.executeQuery(SelectImpl.java:499)
    	at org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:424)
    	at org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:391)
    	at org.apache.openjpa.jdbc.sql.LogicalUnion$UnionSelect.execute(LogicalUnion.java:427)
    	at org.apache.openjpa.jdbc.sql.LogicalUnion.execute(LogicalUnion.java:230)
    	at org.apache.openjpa.jdbc.sql.LogicalUnion.execute(LogicalUnion.java:220)
    	at org.apache.openjpa.jdbc.kernel.SelectResultObjectProvider.open(SelectResultObjectProvider.java:94)
    	at org.apache.openjpa.lib.rop.EagerResultList.(EagerResultList.java:34)
    	... 11 more
    NestedThrowables:
    org.postgresql.util.PSQLException: ERROR: invalid escape string
      Hint: Escape string must be empty or one character.
    	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2103)
    	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1836)
    	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
    	at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:512)
    	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388)
    	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:273)
    	at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
    	at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
    	at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
    	at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:286)
    	at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeQuery(LoggingConnectionDecorator.java:1181)
    	at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:284)
    	at org.apache.openjpa.jdbc.sql.PostgresDictionary$PostgresPreparedStatement.executeQuery(PostgresDictionary.java:1012)
    	at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:284)
    	at org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement.executeQuery(JDBCStoreManager.java:1783)
    	at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:274)
    	at org.apache.openjpa.jdbc.sql.SelectImpl.executeQuery(SelectImpl.java:499)
    	at org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:424)
    	at org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:391)
    	at org.apache.openjpa.jdbc.sql.LogicalUnion$UnionSelect.execute(LogicalUnion.java:427)
    	at org.apache.openjpa.jdbc.sql.LogicalUnion.execute(LogicalUnion.java:230)
    	at org.apache.openjpa.jdbc.sql.LogicalUnion.execute(LogicalUnion.java:220)
    	at org.apache.openjpa.jdbc.kernel.SelectResultObjectProvider.open(SelectResultObjectProvider.java:94)
    	at org.apache.openjpa.lib.rop.EagerResultList.(EagerResultList.java:34)
    	at org.apache.openjpa.kernel.QueryImpl.toResult(QueryImpl.java:1251)
    	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:1007)
    	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:863)
    	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:794)
    	at org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:542)
    	at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:315)
    	at org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:331)
    	at org.jpab.Test.query(Test.java:315)
    	at org.jpab.Runner$QueryAction.run0(Runner.java:562)
    	at org.jpab.Runner$TestAction.run(Runner.java:517)
    	at java.lang.Thread.run(Thread.java:662)