cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roman Zamorski" <ram...@tenbit.pl>
Subject Re: ESQL and max-rows / skip-rows attributes
Date Tue, 23 Jan 2001 21:18:12 GMT
> >By looking at the code, it seems that for each execution of a
> ><esql:connection> the underlying query is always executed. Only during
> >insertion of the sql results into the current DOM tree the
> ><esql:max-rows> and <esql:skip-rows> are used to define the range of
> >records (skip-rows, skip-rows + max-rows] to be inserted.
> >
> >As this can easily get very expensive for complex queries, I am looking
> >for an alternative way to 'cache' long results as returned by the esql

there is also an alternative way of doing this by using of SQL 'LIMIT'
command.
LIMIT maxrows || LIMIT skiprows,maxrows
you can put it at the end of the query statement like this:

select * from table limit 10,20;

r.



Mime
View raw message