• 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: CoreData - how to retrieve a particular value (not object)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CoreData - how to retrieve a particular value (not object)


  • Subject: Re: CoreData - how to retrieve a particular value (not object)
  • From: mmalcolm crawford <email@hidden>
  • Date: Fri, 27 May 2005 18:19:22 -0700


On May 27, 2005, at 6:06 PM, T Reaves wrote:

I have the fetch request. What I was wanting to do is to call the fetch request once with each unique value of bar, so that I could group them that way for an NSOutlineView.
You almost certainly shouldn't do that. You should simply execute one fetch request to retrieve all the data you want, and then filter appropriately in memory.
[...]
When you say that I shouldn't do it the way I wanted to, what reasons do you have? Because the API does not effectively support it, or something else?



For efficiency. Since you appear to want to retrieve all the data anyway, it will almost certainly be more efficient to execute one fetch and then filter in memory than it will be to execute N+1 fetches (where N is the number of unique values of bar). Of course, you should also do proper performance analysis...


mmalc

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >CoreData - how to retrieve a particular value (not object) (From: T Reaves <email@hidden>)
 >Re: CoreData - how to retrieve a particular value (not object) (From: Rick Ballard <email@hidden>)
 >Re: CoreData - how to retrieve a particular value (not object) (From: T Reaves <email@hidden>)
 >Re: CoreData - how to retrieve a particular value (not object) (From: mmalcolm crawford <email@hidden>)
 >Re: CoreData - how to retrieve a particular value (not object) (From: T Reaves <email@hidden>)

  • Prev by Date: Re: CoreData - how to retrieve a particular value (not object)
  • Next by Date: Re: Can an mdimporter embed some frameworks as an application ?
  • Previous by thread: Re: CoreData - how to retrieve a particular value (not object)
  • Next by thread: Action Button / Menu
  • Index(es):
    • Date
    • Thread