cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <>
Subject Re: SQLTemplate fetchLimit
Date Sat, 17 Feb 2007 22:56:04 GMT

On Feb 16, 2007, at 2:36 PM, Bryan Lewis wrote:

> Just checking my understanding of something...  Does it make any sense
> to call setFetchLimit() on a SQLTemplate?  We're supplying the raw SQL
> so I would think we'd have to hand-craft the fetch limit as well, say
> with a 'rownum' or 'limit'.

Really up to you. In this case Cayenne fetch limit will still work  
(i.e. Cayenne will ensure that no more than X rows are read via  
JDBC), but it is definitely more efficient to incorporate this syntax  
in the SQL query to let the DB know and optimize the query accordingly.


View raw message