Re: Problem concerning Prefetching

2008-01-28 Thread Jean-Paul Le Fèvre
On Monday 28 January 2008, Michael Gentry wrote: > Even with a one-to-many, Cayenne will still do the prefetches as > shown. If you don't need everything at once, the batching idea > suggested by Ari will probably be your best bet. Otherwise, you'll > need to figure out a non-typical way of fetch

Re: Problem concerning Prefetching

2008-01-28 Thread Michael Gentry
Even with a one-to-many, Cayenne will still do the prefetches as shown. If you don't need everything at once, the batching idea suggested by Ari will probably be your best bet. Otherwise, you'll need to figure out a non-typical way of fetching the data which works right for your application. Thi

Re: Problem concerning Prefetching

2008-01-28 Thread Jean-Paul Le Fèvre
On Monday 28 January 2008, Michael Gentry wrote: > Hi Jean-Paul, Hi Michael and Andrus, > > It looks like galaxy -> galaxy_component_properties is a to-one > relationship, which would cause Cayenne to issue multiple selects like > this since it tries to resolve each fault individually. It's a on

Re: Problem concerning Prefetching

2008-01-28 Thread Michael Gentry
Hi Jean-Paul, It looks like galaxy -> galaxy_component_properties is a to-one relationship, which would cause Cayenne to issue multiple selects like this since it tries to resolve each fault individually. Given your manual SQL statement: select galaxies.number, galaxy_component_properties.mass_o

Re: Problem concerning Prefetching

2008-01-28 Thread Andrus Adamchik
On Jan 28, 2008, at 3:31 PM, Jean-Paul Le Fèvre wrote: then ~4 queries : SELECT DISTINCT t0.* FROM galaxies t0, galaxy_component_properties t1 WHERE t0.id = t1.galaxy_id AND (t1.id = n) Yes, this is not normal. How do you build the query? Andrus

Re: Problem concerning Prefetching

2008-01-28 Thread Jean-Paul Le Fèvre
On Thursday 24 January 2008, Aristedes Maniatis wrote: > On 25/01/2008, at 3:10 AM, Jean-Paul Le Fèvre wrote: > > I'm currently trying to improve the performances of my queries. > > I've added a call to addPrefetch() in my code but the result was not > > as > > expected : the time to fetch the 4259

Re: Problem concerning Prefetching

2008-01-24 Thread Aristedes Maniatis
On 25/01/2008, at 3:10 AM, Jean-Paul Le Fèvre wrote: I'm currently trying to improve the performances of my queries. I've added a call to addPrefetch() in my code but the result was not as expected : the time to fetch the 42597 rows increased from 35 s without addPrefetch() to 56 s with ad

Problem concerning Prefetching

2008-01-24 Thread Jean-Paul Le Fèvre
Hi, I'm currently trying to improve the performances of my queries. I've added a call to addPrefetch() in my code but the result was not as expected : the time to fetch the 42597 rows increased from 35 s without addPrefetch() to 56 s with addPrefetch() What I am doing wrong ? --