On Jul 28, 2006, at 3:15 PM, Dirk Stoop wrote:

> Hi Everybody,
>
> We're writing a Mac OS X app which uses an SQLite data store through
> sqlobject.
>
> I'm tuning the app for better performance and found that setting:
> "PRAGMA synchronous = OFF"
> improves performance dramatically, which is to be expected if you
> read the description found on http://sqlite.org/pragma.html
>
> Since we're running this app on a journaled file system, and SQLite
> keeps a journal of everything it hasn't written to the database yet,
> it seems to me that it's not necessary to let SQLite check for every
> transaction if it's actually written to disk.
>
> Does any of you have any experience with using SQLite files with
> "PRAGMA synchronous = off" on a journaled filesystem?
>
> Could you offer me any clue about the kind of trade-off I'm making?

You might loose data. The journal on HFS+ is a meta-data journal, it  
ensures that the metadata (such as the mtime of files and  
administratration about which blocks are in use) can be made  
correctly after a crash without a full check of the filesystem, but  
doesn't guarantee that the contents of files is correct. One way you  
might notice the difference is when you append data to a file, if a  
crash happens you might end up with a file that has already been  
extended (blocks allocated and file size updated), but doesn't  
actually contain the data your wrote to it (but NUL bytes instead).

Ronald


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to