I wonder if it is possible to use skip/max in sql statement.
 
Every database has it's own solution for limiting rows:
- sql server has top
- postgresql : limit and offset
- mysql: also limit and offset ( if I have a good memory:)
- oracle prior to 9i combination of: rownum, order like this:
select * from
  (select kol1, kol2
   from table
   order by kol1)
where rownum <15
 
 
- oracle 9i provides analytic function like rownumber
 
and so on and on ...
 
So it seems to be possible
Have you ever considered that way?
 
 
 
Darek Dober
----- Original Message -----
Sent: Monday, August 01, 2005 8:37 AM
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



Reply via email to