Hi all,

I know this has been asked before... I've been searching and searching and RTFMing so I've seen the paper-trail of askees over the years...

Anyway, is there any way to query CoreData in chunks? I have a very large CoreData SQl store (>1 million) of managed objects and it's taking for ever (well, tens of minutes) to load it all in, never mind to search through it all.

NSFetchRequest has a very handy setFetchLimit selector but it's fairly useless (to my particular problem anyhow) without being able to specify an offset.

Being able to say "give me the first 10000 rows" is cool and all, but not being able to say "give me the NEXT 10000 rows" is a real pain.

I know CoreData is supposed to be able to handle billions (citation: http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/cdPerformance.html [search page text for "billions"]) of rows, but seriously, I'm not getting these results. Any more than a few tens of thousands of results and it's slow down city.

I think I have a solution... I'm about to embark on a testing run with using multiple stores... if I hit more than umpteen thousand records, I'll just create a new store and stick the new rows in there... this way, when the user performs a search, I can query the first store, present the results, then append the results of searching subsequent stores as they become available. At least in this way the user has something to be looking at while the rest of the search is performed.

I know this way of doing things is tantamount to spinning plates, but it's gotta be worth a shot right?

So, my question is... does any bright soul have any light to shed, any experiences to share, etc etc, with manipulating very large data sets in CoreData?

Yours, extremely grateful for any advice,
Ian



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to