You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Alexander Prozor <ap...@isd.dp.ua> on 2003/07/02 16:39:13 UTC

Re[2]: RsIterator question

Hello Mykola,

Wednesday, July 2, 2003, 5:27:39 PM, you wrote:

MO> The main reason I'm using getIteratorByQuery is because my DB table is
MO> pritty big (~100 000 records). Putting all the records into Collection is
MO> too memory expensive.

MO> I'll very appreciate any help of dealing with big DB tables.
you can use Proxy for your collection.


-- 
Best regards,
 Alexander                            mailto:apro@isd.dp.ua


Re: Re[2]: RsIterator question

Posted by Mykola Ostapchuk <my...@sympatico.ca>.
Thank you! Sounds good to me - I'll try this approach.

Regards,
Mykola

----- Original Message ----- 
From: "Jin Bal" <ji...@hotmail.com>
To: "OJB Users List" <oj...@db.apache.org>
Sent: Wednesday, July 02, 2003 10:54 AM
Subject: Re: Re[2]: RsIterator question


> The approach I take is to limit the number of rows returned and "page the
> results".
>
> This can be acheived by setting startAt and endAt indexes on the Query
> object, then you just have to keep track of the page you're on and work
out
> the start and end index depending on how many you'er displaying on each
page
>
> also means that you don't have to pass iterators etc to the jsp page
keeping
> you're architecture simpler - you just return the 20 long collection of
> materialised objects
>
> HTH
>
> Jin
>
>
> ----- Original Message -----
> From: "Alexander Prozor" <ap...@isd.dp.ua>
> To: "OJB Users List" <oj...@db.apache.org>; "Mykola Ostapchuk"
> <my...@sympatico.ca>
> Sent: Wednesday, July 02, 2003 3:39 PM
> Subject: Re[2]: RsIterator question
>
>
> > Hello Mykola,
> >
> > Wednesday, July 2, 2003, 5:27:39 PM, you wrote:
> >
> > MO> The main reason I'm using getIteratorByQuery is because my DB table
is
> > MO> pritty big (~100 000 records). Putting all the records into
Collection
> is
> > MO> too memory expensive.
> >
> > MO> I'll very appreciate any help of dealing with big DB tables.
> > you can use Proxy for your collection.
> >
> >
> > --
> > Best regards,
> >  Alexander                            mailto:apro@isd.dp.ua
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> > For additional commands, e-mail: ojb-user-help@db.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>


Re: Re[2]: RsIterator question

Posted by Jin Bal <ji...@hotmail.com>.
The approach I take is to limit the number of rows returned and "page the
results".

This can be acheived by setting startAt and endAt indexes on the Query
object, then you just have to keep track of the page you're on and work out
the start and end index depending on how many you'er displaying on each page

also means that you don't have to pass iterators etc to the jsp page keeping
you're architecture simpler - you just return the 20 long collection of
materialised objects

HTH

Jin


----- Original Message -----
From: "Alexander Prozor" <ap...@isd.dp.ua>
To: "OJB Users List" <oj...@db.apache.org>; "Mykola Ostapchuk"
<my...@sympatico.ca>
Sent: Wednesday, July 02, 2003 3:39 PM
Subject: Re[2]: RsIterator question


> Hello Mykola,
>
> Wednesday, July 2, 2003, 5:27:39 PM, you wrote:
>
> MO> The main reason I'm using getIteratorByQuery is because my DB table is
> MO> pritty big (~100 000 records). Putting all the records into Collection
is
> MO> too memory expensive.
>
> MO> I'll very appreciate any help of dealing with big DB tables.
> you can use Proxy for your collection.
>
>
> --
> Best regards,
>  Alexander                            mailto:apro@isd.dp.ua
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>