• 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: Fetch Optimization Advice
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fetch Optimization Advice


  • Subject: Re: Fetch Optimization Advice
  • From: "Mr. Frank Cobia" <email@hidden>
  • Date: Wed, 8 Jul 2009 16:33:00 -0400

There are definitely a lot of fetches since the reports are custom to each user and there are more than 40,000 users, but the fetch does indeed pull a lot of rows and each row has a large text description that I am not using.

I am using prefetching for the two relationships I use, but I am using the prefetching on ERXFetchSpecification. I have not looked at ERXBatchFetchUtilities. I will take a look at that.

Is there any advantage to creating a view and pointing my new entity to that view as opposed to just pointing the entity directly to the table and leaving out the fields I am not interested in? It seems like the view would just add overhead, but you may know some advantage to using it that I am not aware of.

Thanks,
Frank


On Jul 8, 2009, at 4:24 PM, Mike Schrag wrote:

speaking without knowledge of any specifics of your app, it's generally number of roundtrips that is the big performance killer rather than the number of columns that come back, unless you have an especially large number of columns that have especially large data ... if it's #2, and this is just reporting, i would recommend making some custom views that only pull back what you need and make new eo's that sit on top of those views. my first thought is that you're probably not prefetching effectively, but that's a completely naive comment -- just what screws most people for performance. Turn on sql debug and do you see a ton of faults of to-one's and to- many's? if so, those are prime candidates for ERXBatchFetchUtilities to prefetch them in bulk. if the fetches you see are appropriately faulting, only THEN would i start to look at other things like column counts and raw rows.

ms

On Jul 8, 2009, at 4:19 PM, Mr. Frank Cobia wrote:

I have created a WebObjects command line app (uses ERXMainRunner) that generates a report for each user (40,000+) on my system and it is running too slow. I have come up with two ways to optimize it and I was wondering which you thought is better.

The report uses a table (TableA) that has a lot of fields, most of which are not relevant to the report. It also has a Text field which could be rather large.

One option is to create TableAReport that points to the same database table, but only include the few (small) fields that I need for the report. I know the downside to this is that WebObjects can get confused when there are two entities pointing to the same data, but this command line app is only run once a day, it is read only and (hopefully) only runs for a few minutes.

The other is to go to raw row fetches, but I lose some of the nice EOF stuff like traversing relationships. (TableA has two relationship I use).

Any Advice?

Thanks,
Frank
_______________________________________________
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:
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: This email sent to email@hidden
  • Follow-Ups:
    • Re: Fetch Optimization Advice
      • From: Mike Schrag <email@hidden>
References: 
 >Fetch Optimization Advice (From: "Mr. Frank Cobia" <email@hidden>)
 >Re: Fetch Optimization Advice (From: Mike Schrag <email@hidden>)

  • Prev by Date: Re: And the beat goes on...
  • Next by Date: Re: Fetch Optimization Advice
  • Previous by thread: Re: Fetch Optimization Advice
  • Next by thread: Re: Fetch Optimization Advice
  • Index(es):
    • Date
    • Thread