ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Butler" <jeffgbut...@gmail.com>
Subject Re: SQL fired by iBATIS
Date Tue, 02 Oct 2007 15:36:07 GMT
Yes...

select foo
from bar
fetch first 200 rows only

Jeff Butler


On 10/2/07, Larry Meadors <lmeadors@apache.org> wrote:
>
> Depends on the driver.
>
> Does it support any "top N" and/or "bottom N" type queries?
>
> If not, and you are looking to improve performance, you may want to
> look into using stored procedures to do the limiting.
>
> Larry
>
>
> On 10/2/07, Hemant. Kamatgi <Hemant.Kamatgi@target.com> wrote:
> > Hi,
> >
> > We are using DB2 server and it doesn't have a functionality as 'rownum'
> in oracle to limit the results. Hence, we are using iBATIS's
> ''queryForList(String id,
> > > Object parameterObject, int skip, int max)' to achieve the same. Does
> this de-grade the performance very badly?
> >
> > Rgds
> > Hemant
> >
> > -----Original Message-----
> > From: larry.meadors@gmail.com [mailto:larry.meadors@gmail.com] On Behalf
> Of Larry Meadors
> > Sent: Monday, October 01, 2007 9:16 PM
> > To: user-java@ibatis.apache.org
> > Subject: Re: SQL fired by iBATIS
> >
> > The SQL is run exactly as it is in the sql map, but the (skip) results
> > are skipped, and only (max) rows are mapped to objects.
> >
> > To answer what I think your question is: The limiting is done in Java,
> > not in SQL.
> >
> > There is no SQL standard for limiting the results, so we let you do it
> > this way (easy, but not terribly efficient), or in your SQL (harder,
> > but lots more efficient).
> >
> > Larry
> >
> >
> > > I want to see the 'SQL' that iBATIS is firing to the Database. We are
> > > curious to see how the results are fetched for 'queryForList(String
> id,
> > > Object parameterObject, int skip, int max)'  method.
> >
>

Mime
View raw message