Re: Design pattern for bulk data handling
Re: Design pattern for bulk data handling
- Subject: Re: Design pattern for bulk data handling
- From: Jens Alfke <email@hidden>
- Date: Sat, 08 Feb 2014 16:17:56 -0800
On Feb 8, 2014, at 2:54 PM, Tito Ciuro <email@hidden> wrote:
> For even more speed, consider turning off the following setting:
> http://www.sqlite.org/pragma.html#pragma_synchronous
(This is getting slightly off-topic, but…)
The only time I'd set synchronous to OFF is while populating a _new_ database file, as part of some sort of "safe save" process where you create the file in a temporary directory, write to it, and only move it into the real directory at the end.
Basically when synchronous is OFF it's entirely possible that a power failure or kernel panic could corrupt the database. (I've seen this happen several times. It's not just theoretical.) So don't use it on a database file that has any data you mind losing, or that's in a location where the user might try to re-open it later (because if she does, you'll get a support ticket about your app crashing or failing to open the file.)
—Jens
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden