Hi Satish,

Larry is correct.  Last week was a terrible week for me.  The site kept going 
down due to memory
hog.  It was fine when there were few visitors.  When the users increased all 
of the 1GB ram
allocated was eaten up in 6 mins.  

The developer was getting all the data first, thus creating hundreds of objects 
and then filtering
it.  I had to rewrite all the sql to get only what was required.  

The best thing would be to pass those values to the Stored Procedure and then 
filter it within the
stored procedure.  This is good for both improve performance and use less 
memory.

Rgds
Prashanth.


--- "Rao, Satish" <[EMAIL PROTECTED]> wrote:

> I originally had a <select> and I was passing in skipresults and
> maxresults to queryForList()  to retrieve a subset of data.
>  
> I am now using <procedure> with a REF CURSOR and the same
> queryForList(). I am using a RefTypeHandler to map the ResultSet to a
> set of domain objects.
>  
> The query works fine, but the entire list is retrieved (skipresults and
> maxresults is not being applied). 
>  
> My guess is since the <procedure> is using a <parameterMap> and not a
> <resultMap>, I am running into this issue. 
>  
> Any suggestions?
>  
> Thanks.
>  
>  
>  -----Original Message-----
> From: Larry Meadors [mailto:[EMAIL PROTECTED] 
> Sent: Monday, August 01, 2005 11:37 AM
> To: [email protected]
> Subject: Re: Stored procedure with queryForList skipresults and
> maxresults
> 
> 
> 
>       It is.
>       
>       When you use skip/max, the trimming is done after the results
> are retrieved. If you are looking to improve performance, it would be
> better to do it in the stored procedure.
>       
>       Larry
>       
>       
>       
>       On 8/1/05, Rao, Satish <[EMAIL PROTECTED]> wrote: 
> 
>               I am using a queryForList with skipresults and
> maxresults to retrieve records from Oracle. I have implemented this
> using <select> and SQL statement. I am not explicitly passing in
> skipresults and maxresults to the SQL as ibatis takes care of this. It
> works great.
> 
>               Now I want to use a stored procedure instead of a SQL. I
> am assuming even for the stored procedure I don't need to pass in
> skipresults and maxresults to the stored procedure. Please confirm if my
> assumption is correct.
> 
>               Thanks 
> 
> 
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to