• 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
Core Data, SQLite, and Housekeeping
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Core Data, SQLite, and Housekeeping


  • Subject: Core Data, SQLite, and Housekeeping
  • From: "I. Savant" <email@hidden>
  • Date: Wed, 5 Mar 2008 12:15:10 -0500

  I have a group of related questions that I've wondered about from
time to time that I finally got around to looking up. I wanted to know
if SQLite store types are vacuumed or if auto-vacuum is enabled, etc.

  I checked files created by Core Data and auto-vacuum is indeed
enabled ("full" mode):

sqlite> PRAGMA auto_vacuum;
1

  ... so that's fine, but SQLite's documentation says of auto_vacuum:

"When the auto-vacuum flag is 1 (full), the freelist pages are moved
to the end of the file and the file is truncated to remove the
freelist pages at every commit. Note, however, that auto-vacuum only
truncates the freelist pages from the file. Auto-vacuum does not
defragment the database nor repack individual database pages the way
that the VACUUM command does. In fact, because it moves pages around
within the file, auto-vacuum can actually make fragmentation worse."

  Okay, well that sucks. So now the question is this: does Core Data
implicitly run VACUUM? If so, when? How often? Unfortunately googling
and archive-searching did not produce any obvious answers to this
particular question. My guess is that the answer is, "Yes, at every
save," but I'd like to be sure and I'm not familiar enough with SQLite
to know how to test this myself. Any takers?

--
I.S.
_______________________________________________

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

  • Follow-Ups:
    • Re: Core Data, SQLite, and Housekeeping
      • From: "I. Savant" <email@hidden>
    • Re: Core Data, SQLite, and Housekeeping
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Deinterlacing QTCaptureDecompressedVideoOutput
  • Next by Date: Re: Localise between different versions of English
  • Previous by thread: Re: Deinterlacing QTCaptureDecompressedVideoOutput
  • Next by thread: Re: Core Data, SQLite, and Housekeeping
  • Index(es):
    • Date
    • Thread