Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: setting default order of entity fetches




On Aug 23, 2007, at 6:41 AM, Lachlan Deck wrote:


Personally, I can't see the benefit of continually sorting a keyPath in memory via some ui option every time you access that array rather than once from the fetch where possible...

That depends on your particular situation.  If you ever work on a WebObjects app where you deploy thousands of instances then you might
change  your opinion.  At that point you'll find that you have copious amounts of spare CPU cycles on your application hosts and you'll be trying 
to squeeze every possible performance gain from your DB queries.  Sorting in the database is not a cheap as most people think.  Many times 
it results in disk i/o that would not have happened where it not for the sort.

Also, you don't have to sort every time.  It's quite trivial to cache the sorted array and invalidate that cache when the relationship 
changes (or is refaulted).  

Alan


with regards,
--

Lachlan Deck

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

This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/email@hidden

This email sent to email@hidden

References: 
 >setting default order of entity fetches (From: Lachlan Deck <email@hidden>)
 >Re: setting default order of entity fetches (From: Chuck Hill <email@hidden>)
 >Re: setting default order of entity fetches (From: Lachlan Deck <email@hidden>)
 >Re: setting default order of entity fetches (From: Chuck Hill <email@hidden>)
 >Re: setting default order of entity fetches (From: Lachlan Deck <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.