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
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
