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

I'll very appreciate any help of dealing with big DB tables.


> Hello Mykola,
>
> MO> I'm using  broker.getIteratorByQuery(query);  to return Iterator of
all
> MO> Users in DB.
> MO> Then I pass this Iterator to JSP page (or Struts <logic:iterate tag) -
and
> MO> as the result it displays nothing.
> MO> I'm not sure it's the problem with OJB, but - if I pass to JSP page
> MO> Iterator, created from a Collection - it works OK.
> MO> Maybe OJB's Iterator - RsIterator doesn't work this way?
>
> MO> By the way - is using broker.getIteratorByQuery() the best way to deal
with
> MO> displaying big DB tables?
> I think no - because of when you get Iterator, OJB will generate SQL
> for each iter.next() call.
> maybe will be better to use getCollectionByQuery() - in this case
> you'll get whole collection at time.
>
> but of course I may be wrong.
>
> -- 
> Best regards,
>  Alexander                            mailto:[EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to