R
Rico
I'm working on this JSP page that's supposed to display data retrieved
from a database let's say 20 rows at a time. Currently, when we need the
x'th set of 20 rows, what's being done is to select the top 20 rows that
are not in the first (x-1) set of 20 rows.
Something tells me that somebody is just being naive here because a lot of
data is being requested for the purpose of being thrown away. I'm thinking
that it would be better if we could read the data into memory, suitable
data structures, and extract the rows from there as the user navigates
from one set/page of 20 rows to another.
However, the user would also be able to make modifications to the data. I
can either update the modified rows in the data structures accordingly or
throw everything away and refresh the data structures with the latest
contents of the database.
I'll be looking up some example of how to use what I think should be
'session' scope to achieve what I described. Suggestions welcome though.
I'm mainly wondering if there could be any tools or libraries that would
ease the implementation of this kind of, how to call it... caching? that
I am considering?
Thanks.
Rico.
from a database let's say 20 rows at a time. Currently, when we need the
x'th set of 20 rows, what's being done is to select the top 20 rows that
are not in the first (x-1) set of 20 rows.
Something tells me that somebody is just being naive here because a lot of
data is being requested for the purpose of being thrown away. I'm thinking
that it would be better if we could read the data into memory, suitable
data structures, and extract the rows from there as the user navigates
from one set/page of 20 rows to another.
However, the user would also be able to make modifications to the data. I
can either update the modified rows in the data structures accordingly or
throw everything away and refresh the data structures with the latest
contents of the database.
I'll be looking up some example of how to use what I think should be
'session' scope to achieve what I described. Suggestions welcome though.
I'm mainly wondering if there could be any tools or libraries that would
ease the implementation of this kind of, how to call it... caching? that
I am considering?
Thanks.
Rico.