Re: Validating unique objects in CoreData
Re: Validating unique objects in CoreData
- Subject: Re: Validating unique objects in CoreData
- From: Chris Hanson <email@hidden>
- Date: Sun, 14 Feb 2010 12:37:21 -0800
On Feb 13, 2010, at 2:32 AM, daniele malcom wrote:
> Here you will found my simple storage data model:
> http://img197.imageshack.us/img197/4388/screenshot20100213at111.jpg
If you’re going to represent a UUID in Core Data, you are likely to be far better off storing and searching on it as two 64-bit integer attributes than storing and searching on it as a single string attribute, regardless of indexing.
It will also avoid bloating your database unnecessarily: Storing a 16-byte UUID in the canonical string format will take at least 36 bytes, possibly as many as 72 bytes if it’s stored as 16-bit Unicode code points rather than UTF-8.
Now, if you’re saying “UUID” when what you really mean is “RFC-822 message ID” then none of the above applies, because they’re not a standard 16-byte quantity, but a string formatted according to RFC-822 and related standards. One suggestion I would have is to try splitting them off into their own entity, and measure performance of performing queries directly against that entity.
— Chris
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden