Tomas Zerolo wrote:
(b) Repeat the query (making sure there is a sort criterium) at each
page request, starting at a variable offset and limiting the
result set
(c) Do the whole query at once, putting the results in some kind
of array.
I typically use a combination, retrieving all of the IDs in order in one
shot and saving that in a cache, and then grabbing the details of the 10
records needed for the current page as I go. This is described somewhat
here:
http://perl.apache.org/docs/tutorials/apps/scale_etoys/etoys.html#Search_servers
- Perrin