title: What is a fast way to get data from CoreData in iOS?
body: <p>Ok, so here's the situation.  I'm making a program where you can save and load documents that contain text and images (some pretty large images). For the backend, I'm using CoreData with a <code>UIManagedDocument</code> and my own subclass of (let's call this <code>NotificationDocument</code>) of <code>NSManagedDocument</code>.  </p>
  
  <p>Right now each <code>NotificationDocument</code> has two attributes representing which save slot's its saved in and what it's saved name is.  I have a TableView which is displaying a list of my documents and which save slot they are in (ex: "Save Slot 1: Cleaning Template").</p>
  
  <p>However, it takes FOREVER for me to populate this tableview.  What I am doing is in viewDidLoad is: </p>
  
  <pre><code>NSFetchRequest *fetchRequest = [NSFetchRequest fetchRequestWithEntityName:@"NotificationDocument"];
  NSArray *notifications = [self.database.managedObjectContext executeFetchRequest:fetchRequest error:nil];
  </code></pre>
  
  <p>It seems logical to suspect that my program is running so slow because I am retrieving all of the notificationDocuments in their entirety and moving them into memory.  Is there a better (faster) way to do this, given that I really don't need all the notificationDocuments, I only need their save slot and save name attributes.  What would be the best way to accomplish this?</p>
  
  <p>I have thought about also storing in CoreData a map entity mapping save slots to the names saved in them.  However, if there was a good way to do this without saving an entirely separate entity, that would be preferable.  Thanks.</p>