Re: Batch faulting with Cayenne 3

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Wed Nov 14 2007 - 08:45:47 EST

  • Next message: Alexander Lamb (dev): "Re: Batch faulting with Cayenne 3"

    Can you use prefetching instead? You got a list of users vis some
    sort of query - just add prefetch to that query.

    Andrus

    On Nov 14, 2007, at 8:11 AM, Alexander Lamb (dev) wrote:

    > Hello list,
    >
    > One thing is killing performance of our application: it is the
    > resolving of individual to-one faults in lists.
    >
    > For example, we can have 200 roles each refering to a person.
    >
    > When we loop through the roles, for each role where we do a
    > role.getPerson() there will be a return trip to the database.
    >
    > In the EOF days, there was a possibility to define a batch faulting
    > strategy for the entity. In that we would say for example "batch
    > fault 20 for person" and the first time a to-one fault to person
    > from role would be found, it would look in the data context for up
    > to 19 more to build a single SQL statement and fetch in one go the
    > person objects and resolve up to 20 faults.
    >
    > Is this feature available somewhere in Cayenne 3m2 or planned in
    > the near future?
    >
    > If not, is there some kind of callback or hook wich would allow us
    > to do the same thing?
    >
    > Thanks,
    >
    > Alex
    >



    This archive was generated by hypermail 2.0.0 : Wed Nov 14 2007 - 08:46:21 EST