Hibernate with SQLite embedded

Performance Result Summary

The final position of Hibernate with SQLite embedded in the speed performance tests is 27 out of 32,

The following charts show Hibernate with SQLite embedded relatively to other tested JPA/DBMS combinations.

Position #1 on the X-Axis (the fastest) is about 100 times faster than position #32 (the slowest).
In the chart below the Y-Axis represents result score (maximum 100) in logarithmic scale - higher is better:
JPA performance benchmark comparision Hibernate, EclipseLink, OpenJPA, DataNucleus, ObjectDB
In the chart below the Y-Axis represents result score (maximum 100) in linear scale - higher is better:
JPA performance benchmark comparision Hibernate, EclipseLink, OpenJPA, DataNucleus, ObjectDB

Hibernate with SQLite embedded Problems (Exceptions)

Hibernate with SQLite embedded has failed in the following tests (throwing the following stack traces):

  • Multithreading Test - Update Operations - Few Entities (5/100)
    javax.persistence.PersistenceException: unexpected error when rollbacking
    	at org.hibernate.ejb.TransactionImpl.rollback(TransactionImpl.java:110)
    	at org.jpab.Test.doAction(Test.java:281)
    	at org.jpab.Runner$UpdateAction.run0(Runner.java:565)
    	at org.jpab.Runner$TestAction.run(Runner.java:508)
    	at java.lang.Thread.run(Thread.java:619)
    Caused by: org.hibernate.TransactionException: JDBC rollback failed
    	at org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:200)
    	at org.hibernate.ejb.TransactionImpl.rollback(TransactionImpl.java:107)
    	... 4 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.rollback(Conn.java:172)
    	at com.mchange.v2.c3p0.impl.NewProxyConnection.rollback(NewProxyConnection.java:855)
    	at org.hibernate.transaction.JDBCTransaction.rollbackAndResetAutoCommit(JDBCTransaction.java:213)
    	at org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:192)
    	... 5 more
    
  • Multithreading Test - Update Operations - Many Entities (5000)
    javax.persistence.PersistenceException: unexpected error when rollbacking
    	at org.hibernate.ejb.TransactionImpl.rollback(TransactionImpl.java:110)
    	at org.jpab.Test.doAction(Test.java:281)
    	at org.jpab.Runner$UpdateAction.run0(Runner.java:565)
    	at org.jpab.Runner$TestAction.run(Runner.java:508)
    	at java.lang.Thread.run(Thread.java:619)
    Caused by: org.hibernate.TransactionException: JDBC rollback failed
    	at org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:200)
    	at org.hibernate.ejb.TransactionImpl.rollback(TransactionImpl.java:107)
    	... 4 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.rollback(Conn.java:172)
    	at com.mchange.v2.c3p0.impl.NewProxyConnection.rollback(NewProxyConnection.java:855)
    	at org.hibernate.transaction.JDBCTransaction.rollbackAndResetAutoCommit(JDBCTransaction.java:213)
    	at org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:192)
    	... 5 more
    
  • Multithreading Test - Removal Operations - Few Entities (5/100)
    javax.persistence.PersistenceException: unexpected error when rollbacking
    	at org.hibernate.ejb.TransactionImpl.rollback(TransactionImpl.java:110)
    	at org.jpab.Test.doAction(Test.java:281)
    	at org.jpab.Runner$RemoveAction.run0(Runner.java:586)
    	at org.jpab.Runner$TestAction.run(Runner.java:516)
    	at java.lang.Thread.run(Thread.java:619)
    Caused by: org.hibernate.TransactionException: JDBC rollback failed
    	at org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:200)
    	at org.hibernate.ejb.TransactionImpl.rollback(TransactionImpl.java:107)
    	... 4 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.rollback(Conn.java:172)
    	at com.mchange.v2.c3p0.impl.NewProxyConnection.rollback(NewProxyConnection.java:855)
    	at org.hibernate.transaction.JDBCTransaction.rollbackAndResetAutoCommit(JDBCTransaction.java:213)
    	at org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:192)
    	... 5 more
    
  • Multithreading Test - Removal Operations - Many Entities (5000)
    javax.persistence.PersistenceException: unexpected error when rollbacking
    	at org.hibernate.ejb.TransactionImpl.rollback(TransactionImpl.java:110)
    	at org.jpab.Test.doAction(Test.java:281)
    	at org.jpab.Runner$RemoveAction.run0(Runner.java:586)
    	at org.jpab.Runner$TestAction.run(Runner.java:516)
    	at java.lang.Thread.run(Thread.java:619)
    Caused by: org.hibernate.TransactionException: JDBC rollback failed
    	at org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:200)
    	at org.hibernate.ejb.TransactionImpl.rollback(TransactionImpl.java:107)
    	... 4 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.rollback(Conn.java:172)
    	at com.mchange.v2.c3p0.impl.NewProxyConnection.rollback(NewProxyConnection.java:855)
    	at org.hibernate.transaction.JDBCTransaction.rollbackAndResetAutoCommit(JDBCTransaction.java:213)
    	at org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:192)
    	... 5 more
    

The following runs have been stopped due to being too slow

  • Element Collection Test - Query Operations - Many Entities (5000)
  • Element Collection Test - Update Operations - Many Entities (5000)
  • Element Collection Test - Removal Operations - Many Entities (5000)

Hibernate with SQLite embedded compared to the alternatives

See head to head comparisons of Hibernate with SQLite embedded vs the following compatitors: