You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Jahan Zaib <za...@iiu.edu.pk> on 2009/06/22 06:46:08 UTC

Help reuires regarding huge data retrieval

Hi all,
i need help. that i run a select query from my data base, which return
millions of records from oracle. The application give a retrieval error
(after a long time) of over flow.
What should i do to implement paging and get only few data at a time.
(rownum does not work because it select query has to perform some addition
operations too)
i m using myeclipse ide
i am new bee, so please help me detailed.

-- 
Regards,
Jahan Zaib

Re: Help reuires regarding huge data retrieval

Posted by Glenn Barnard <ba...@gmail.com>.
Jahan,

You're exceeding memory because Ibatis wants to create an object for each
row returned--not much use in that. There are 2 things you need to
consider....

1. If you're displaying the data, no one can see millions of rows, so
consider SET ROWCOUNT X before the SELECT and make sure you SET ROWCOUNT 0
afterwards.

2. If you're making computations, consider letting SQL do it, or get the
connection from the data map and do the computations using regular JDBC
calls to access the fields you need.



On Mon, Jun 22, 2009 at 12:46 AM, Jahan Zaib <za...@iiu.edu.pk>wrote:

> Hi all,
> i need help. that i run a select query from my data base, which return
> millions of records from oracle. The application give a retrieval error
> (after a long time) of over flow.
> What should i do to implement paging and get only few data at a time.
> (rownum does not work because it select query has to perform some addition
> operations too)
> i m using myeclipse ide
> i am new bee, so please help me detailed.
>
> --
> Regards,
> Jahan Zaib
>
>