[odb-users] Closing SQLite Database/Performance Gains

Sum, Eric B eric.b.sum at lmco.com
Wed Jul 25 15:57:03 EDT 2012


Hi,

I am persisting and manipulating objects in a SQLite database.  I have 2 questions:


1.       When does the database connection actually close? (In other words, when is the equivalent of the sqlite_close() function called?  Is there an odb function that I need to call to close the database?  Does the connection close when a transaction is committed?  Does it close when the scope of the auto_ptr to the database object has ended?

2.       I am trying to gain performance/speed by using an in-memory database rather than an on-disk one.  However, I have run some tests with odb through many transactions, and I do not notice a significant gain in speed.  Is there a reason for this?  I have read that in-memory databases can be quite beneficial in terms of performance.

Thanks,
Eric


More information about the odb-users mailing list