Yes... select foo from bar fetch first 200 rows only
Jeff Butler On 10/2/07, Larry Meadors <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf > Of Larry Meadors > > Sent: Monday, October 01, 2007 9:16 PM > > To: [email protected] > > 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. > > >
