Hi,
I am interested to hear what your approaches have been to paging through
query result sets using a 'next'/'previous' hotlink mechanism from the
browser. I have listed a few strategies below:
1) Retain a database connection per-user to page through the query results
using JDBC 2.0 cursor functionality. Major downside is that connection is
used soley for given client.
2) Read all the results in from the database and cache in the server - only
give out those results that the user is currently looking at. Downside is
that the results are stored in the server for as long as the user is looking
at them, taking up memory.
3) Read all the results in to a temporary table in the database, then
returning only the subset of results that the user is currently looking at.
Downside is that the database will fill up with result data - will need a
process to clean up this data regularly.
4) Rerun the query against the database each time the user looks at a given
subset of results. Downside is that the query must be rerun and that the
results may change between execution (though fine for static data).
Myles
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html