• 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: Core Data: different fetch performance when launching app [SOLVED]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data: different fetch performance when launching app [SOLVED]


  • Subject: Re: Core Data: different fetch performance when launching app [SOLVED]
  • From: Jakob Olesen <email@hidden>
  • Date: Sat, 14 Oct 2006 16:25:00 +0200


On 14/10/2006, at 15.45, Diederik Hoogenboom wrote:

Thanks! Your last remark did the trick. I just added parentItem == nil to the predicate of the arraycontroller and the fetch now take 0.156 seconds the first time.

Lucky guess ;-)

I would have expected that Z_ENT would be indexed. It's one of the primary columns that are always there. Is there a way to add an index to a table in the SQLLite store, other then creating an relationship?

No.

You can go behind Core Data's back and add the index yourself using the sqlite3 command line tool or the SQLite API, but I wouldn't recommend that.

Z_ENT is a low cardinality attribute. It only takes a few distinct values across your 30,000 records. Such attributes normally don't benefit from being indexed, and each index has a performance penalty when inserting records. That is probably why Core Data doesn't index that attribute.

It would be a nice addition to Core Data to be able to add indices. Currently, every fetch that doesn't use a relationship or an object ID causes a full table scan.

_______________________________________________
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


  • Follow-Ups:
    • Re: Core Data: different fetch performance when launching app [SOLVED]
      • From: Diederik Hoogenboom <email@hidden>
References: 
 >Core Data: different fetch performance when launching app (From: Diederik Hoogenboom <email@hidden>)
 >Re: Core Data: different fetch performance when launching app (From: Jakob Olesen <email@hidden>)
 >Re: Core Data: different fetch performance when launching app (From: Diederik Hoogenboom <email@hidden>)
 >Re: Core Data: different fetch performance when launching app (From: Scott Stevenson <email@hidden>)
 >Re: Core Data: different fetch performance when launching app (From: Diederik Hoogenboom <email@hidden>)
 >Re: Core Data: different fetch performance when launching app (From: Jakob Olesen <email@hidden>)
 >Re: Core Data: different fetch performance when launching app [SOLVED] (From: Diederik Hoogenboom <email@hidden>)

  • Prev by Date: [SOLVED] How to receive text color changes from NSFontPanel?
  • Next by Date: Re: Core Data: different fetch performance when launching app [SOLVED]
  • Previous by thread: Re: Core Data: different fetch performance when launching app [SOLVED]
  • Next by thread: Re: Core Data: different fetch performance when launching app [SOLVED]
  • Index(es):
    • Date
    • Thread