• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to turn of the Journal logging of CoreData/Sqlite?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to turn of the Journal logging of CoreData/Sqlite?


  • Subject: Re: How to turn of the Journal logging of CoreData/Sqlite?
  • From: Jens Alfke <email@hidden>
  • Date: Wed, 06 Apr 2016 10:15:15 -0700

> On Apr 6, 2016, at 8:45 AM, James Cicenia <email@hidden> wrote:
>
> This is only at the install. The WAL file grows to over 500MB. Then when the app is restarted this WAL file is truncated and app goes down to about 35MB.

Oh, you mean _disk_ storage. I thought you meant RAM.

Looking through the WAL docs <https://www.sqlite.org/wal.html> I think what you want is "PRAGMA wal_autocheckpoint=N” where N is the number of (4k) pages the WAL can grow to. Although the docs imply that the WAL is checkpointed (merged into the b-tree) only when a transaction commits, so if Core Data is holding a transaction open for a very long time this might not take effect.

The default wal_autocheckpoint value is 1000, which would be about 4MB, so it seems weird that it would grow to hundreds of megabytes. Again, it might have to do with inserting tons of data in a single long-lived transaction.

—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


References: 
 >How to turn of the Journal logging of CoreData/Sqlite? (From: James Cicenia <email@hidden>)
 >Re: How to turn of the Journal logging of CoreData/Sqlite? (From: Jens Alfke <email@hidden>)
 >Re: How to turn of the Journal logging of CoreData/Sqlite? (From: James Cicenia <email@hidden>)

  • Prev by Date: Re: How to turn of the Journal logging of CoreData/Sqlite?
  • Next by Date: Re: NSURLErrorKey vs. NSURLErrorFailingURLErrorKey
  • Previous by thread: Re: How to turn of the Journal logging of CoreData/Sqlite?
  • Next by thread: Re: How to turn of the Journal logging of CoreData/Sqlite?
  • Index(es):
    • Date
    • Thread