Re: Problem concerning Prefetching

From: Aristedes Maniatis (ar..sh.com.au)
Date: Thu Jan 24 2008 - 17:05:52 EST

  • Next message: hmai..otmail.ru: "Re: Problems running Cayenne ORM Tier and CWS Client Tier on the same JVM."

    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 addPrefetch()

    That is expected. The initial query will take longer with the prefetch
    since you are getting more data. What will be faster is following
    relations later since these other records are now already in memory.
    It is unlikely you'll want to prefetch relations to all 42000 records.

    Investigate paging as possibly a more appropriate optimisation for you.

    Ari Maniatis

    -------------------------->
    ish
    http://www.ish.com.au
    Level 1, 30 Wilson Street Newtown 2042 Australia
    phone +61 2 9550 5001 fax +61 2 9550 4001
    GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A



    This archive was generated by hypermail 2.0.0 : Thu Jan 24 2008 - 17:06:35 EST