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
DataNucleus29.33.20.86 failed 16.52.63.724.9 
EclipseLink24.12.62.00.18  22.42.60.909.8 
Hibernate23.92.82.10.25  21.52.44.27.0 
OpenJPA1.71.10.86   1.41.33.0failed 
ObjectDB     63.7    25.1

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. DataNucleus with Derby embedded46.0
3. ObjectDB server39.5
4. DataNucleus with PostgreSQL server39.1
5. EclipseLink with Derby embedded37.9
6. Hibernate with Derby embedded37.6
7. EclipseLink with Derby server35.2
8. Hibernate with Derby server33.8
9. DataNucleus with Derby server25.9
10. EclipseLink with PostgreSQL server15.4
11. Hibernate with PostgreSQL server11.0
12. Hibernate with MySQL server6.7
13. DataNucleus with MySQL server5.8
14. DataNucleus with H2 embedded5.0
15. OpenJPA with MySQL server4.8
16. Hibernate with H2 embedded4.4
17. EclipseLink with H2 embedded4.1

The Least Efficient (the Slowest):

18. EclipseLink with H2 server4.1
19. DataNucleus with H2 server4.0
20. Hibernate with H2 server3.7
21. Hibernate with HSQLDB embedded3.4
22. EclipseLink with HSQLDB embedded3.2
23. OpenJPA with Derby embedded2.7
24. OpenJPA with Derby server2.2
25. OpenJPA with H2 server2.0
26. OpenJPA with H2 embedded1.7
27. EclipseLink with MySQL server1.4
28. OpenJPA with HSQLDB embedded1.4
29. DataNucleus with HSQLDB embedded1.3
30. Hibernate with SQLite embedded0.39
31. EclipseLink with SQLite embedded0.29
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 1552135788 SELECT t0.id, t0.birthDate, t0.city, t0.country, t0.email, t0.firstName, t0.joinDate, t0.lastLoginDate, t0.lastName, t0.loginCount, t0.middleName, t0.state, t0.street, t0.zip FROM CollectionPerson t0 WHERE (t0.lastName LIKE ? ESCAPE '\\') [params=?]} [code=0, state=22025]
    FailedObject: SELECT o FROM CollectionPerson 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 1552135788 SELECT t0.id, t0.birthDate, t0.city, t0.country, t0.email, t0.firstName, t0.joinDate, t0.lastLoginDate, t0.lastName, t0.loginCount, t0.middleName, t0.state, t0.street, t0.zip FROM CollectionPerson 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)