Re: CayenneRuntimeException: Can't find id

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Wed Jan 16 2008 - 07:34:22 EST

  • Next message: Aristedes Maniatis: "Re: CayenneRuntimeException: Can't find id"

    We used that algorithm on one of the sites from Success Stories for
    result sets with a few thousands of objects. Works pretty well if do
    not neglect other optimizations like caching and sharing read-only
    data. And you do not have to refault the list every time... You can
    for instance add an object at the end of the existing list...

    Andrus

    On Jan 16, 2008, at 1:54 PM, Daniel KvasniÄŤka jr. wrote:

    > On Jan 16, 2008 10:59 AM, Andrus Adamchik <andru..bjectstyle.org>
    > wrote:
    >>
    >> On Jan 16, 2008, at 11:51 AM, Daniel KvasniÄŤka jr. wrote:
    >>
    >>> What troubles me now is that paginated query still retrieves
    >>> EVERYTHING :(
    >>> The manual says Cayenne will retrieve only PKs, but the code I
    >>> posted
    >>> before results in:
    >>
    >> Actually it still does the right thing - it fetches all objects, but
    >> reads only ids of objects from the ResultSet beyond page 1.
    >>
    >
    > Well, but how scalable is this? If I understand it well, when I have
    > 1000 articles in my DB, cayenne 2.0.x will FULLY query for ALL of the
    > 1000 articles on EVERY page change, but will take only PKs from the
    > result rows beyond 1st page? This seems to me like a pretty extreme db
    > server load case.... If I imagine having a portal with thousands of
    > people per day browsing through articles... In success stories, there
    > are some companies that manage pretty big dbs with cayenne, how do
    > they manage these tables with paginated queries? Or am I missing
    > smthing?
    >
    > Dan
    >
    > --
    > http://www.danielkvasnicka.net -- webdesign & corporate design,
    > programování internetových a intranetových aplikací



    This archive was generated by hypermail 2.0.0 : Wed Jan 16 2008 - 07:34:56 EST