Re: CoreData - how to retrieve a particular value (not object)
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