On May 8, 2009, at 5:21 PM, Christian Smith wrote: > On Wed, May 06, 2009 at 10:36:50PM -0400, D. Richard Hipp wrote: >> >> A new optional extension is included that implements an >> asynchronous I/ >> O backend for SQLite on either windows or unix. The asynchronous I/O >> backend processes all writes using a background thread. This gives >> the appearance of faster response time at the cost of durability and >> additional memory usage. See http://www.sqlite.org/asyncvfs.html for >> additional information. > > > What are the benefits of using async I/O over "PRAGMA synchronous = > OFF"? > If AIO is used for the rollback journal as well, you've lost your ACID > properties already, so you may as well just use "PRAGMA synchronous > = OFF" > anyway and keep the code simpler.
That's not the case. You lose the Durability property, in that a COMMIT statement may return before a transaction is stored on the persistent media, but transactions are still Atomic, Consistent and Isolated. When using the "PRAGMA synchronous=off" your database might be corrupted by a power failure or OS crash. When using asynchronous IO this should not be possible (assuming the hardware is not being untruthful - just as when using regular "PRAGMA synchronous=full" mode without the async IO VFS). Dan. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users