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 persistence 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 |
---|---|---|---|---|---|---|---|---|---|---|---|
DataNucleus | 4,211 | 17,111 | 18,857 | failed | 2,379 | 4,891 | 3,059 | 8,797 | |||
EclipseLink | 4,536 | 14,836 | 15,920 | 49.2 | 2,988 | 5,003 | 3,534 | 15,567 | |||
Hibernate | 5,126 | 18,057 | 18,331 | failed | 3,404 | 3,346 | 3,648 | 15,524 | |||
OpenJPA | 4,276 | 16,763 | 13,134 | 2,956 | 3,786 | 3,525 | 11,438 | ||||
ObjectDB | 48,982 | 37,530 |
Performance comparison chart - The Y-Axis represents normalized score in logarithmic scale - higher is better:
Performance comparison chart - The Y-Axis represents normalized score in linear scale - higher is better:
Best and Worst JPA/Database Performer in this comparison
The Most Efficient (the Fastest):
1. | ObjectDB embedded | 100 |
2. | ObjectDB server | 76.6 |
3. | DataNucleus with HSQLDB embedded | 38.5 |
4. | Hibernate with HSQLDB embedded | 37.4 |
5. | Hibernate with H2 embedded | 36.9 |
6. | DataNucleus with H2 embedded | 34.9 |
7. | OpenJPA with H2 embedded | 34.2 |
8. | EclipseLink with HSQLDB embedded | 32.5 |
9. | EclipseLink with PostgreSQL server | 31.8 |
10. | Hibernate with PostgreSQL server | 31.7 |
11. | EclipseLink with H2 embedded | 30.3 |
12. | OpenJPA with HSQLDB embedded | 26.8 |
13. | OpenJPA with PostgreSQL server | 23.4 |
14. | DataNucleus with PostgreSQL server | 18.0 |
15. | Hibernate with Derby embedded | 10.5 |
16. | EclipseLink with H2 server | 10.2 |
17. | DataNucleus with H2 server | 10.0 |
The Least Efficient (the Slowest):
18. | EclipseLink with Derby embedded | 9.3 |
19. | OpenJPA with Derby embedded | 8.7 |
20. | DataNucleus with Derby embedded | 8.6 |
21. | OpenJPA with H2 server | 7.7 |
22. | Hibernate with MySQL server | 7.4 |
23. | EclipseLink with MySQL server | 7.2 |
24. | OpenJPA with MySQL server | 7.2 |
25. | Hibernate with Derby server | 6.9 |
26. | Hibernate with H2 server | 6.8 |
27. | DataNucleus with MySQL server | 6.2 |
28. | EclipseLink with Derby server | 6.1 |
29. | OpenJPA with Derby server | 6.0 |
30. | DataNucleus with Derby server | 4.9 |
31. | EclipseLink with SQLite embedded | 0.10 |
32. | DataNucleus with DB4O embedded | 0.0000 |
33. | Hibernate with SQLite embedded | 0.0000 |
Problems (Exceptions) in these tests
- 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)
The results above are in use in calculating the following average results
- All Tests - All Operations - All Batch Size Modes
- All Tests - All Operations - Few Entities (5/100)
- All Tests - Persistence Operations - All Batch Size Modes
- All Tests - Persistence Operations - Few Entities (5/100)
- Multithreading Test - All Operations - All Batch Size Modes
- Multithreading Test - All Operations - Few Entities (5/100)
- Multithreading Test - Persistence Operations - All Batch Size Modes