• 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
ERXEOControlUtilities.objectsInRange and prefetching brainstorm
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ERXEOControlUtilities.objectsInRange and prefetching brainstorm


  • Subject: ERXEOControlUtilities.objectsInRange and prefetching brainstorm
  • From: Miguel Arroz <email@hidden>
  • Date: Wed, 30 Jul 2008 12:39:53 +0100

Hi!

One of our paged table controllers is based on the ERXEOControlUtilities.objectsInRange method. This works fine, but has a drawback, prefetching is not correctly supported for the fetch specification used.

The problem is that the "main" query has the DESC LIMIT X OFFSET Y at the end, but the queries for prefetching don't have any kind of limitation (which is normal, the same values can't be applied to them) so they pre-fetch for all the objects that would have been pulled by the main spec if there was no range. Which, naturally, may be too much information to be handled efficiently.

I noticed that the prefetching queries are made using a JOIN between the pre-fetched entity and the conditions for fetching the main spec entity. One way this could be solved would be to change the way pre-fetching queries are made to use the primary keys of the values fetched in the main query. It could be as simple as SELECT * FROM pre-fetched-entity WHERE main_entity_id IN (1, 2, 3, 4, ... ).

Also, I still have the problem of not being able to pre-fetch one- to-one relationships. Yes, I know WO doesn't support one-to-one, but they are handy many times. And this is clearly a bug, because the query - the correct query! - is made, but apparently the objects are not integrated in the object graph.

What I'm going to do to simulate the pre-fetching is several fetch specs that pull all the stuff I need in the minimum number of roundtrips as possible. But how hard do you think this would be to solve in WO or Wonder? Sorry for disturbing you guys from MobileMe and SproutsCore integration and all that funny stuff. :)

  Yours

Miguel Arroz

http://www.survs.com

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

  • Follow-Ups:
    • Re: ERXEOControlUtilities.objectsInRange and prefetching brainstorm
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Third Party Jar Project
  • Next by Date: Re: Third Party Jar Project
  • Previous by thread: Re: Third Party Jar Project
  • Next by thread: Re: ERXEOControlUtilities.objectsInRange and prefetching brainstorm
  • Index(es):
    • Date
    • Thread