tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Sangeelee <>
Subject RE: search display problem
Date Tue, 13 Feb 2001 18:28:13 GMT
On Tue, 13 Feb 2001, Randy Layman wrote:

> 	You could suck in all of the resultset into some data holding object
> (List of basically C-style structs) and store this in the session.  Then use
> a current page variable to select the correct rows.  This would probably
> waste lots of memory but would limit the number of database accesses.

I agree it's off topic, but then what would Tomcat be without a DBMS?

An alternative to your idea is only to hold the primary key column in an
array within a session bean, and pages could be accessed using array
chunks of <pagesize> using sql something like: -

	SELECT <columns> FROM TABLE WHERE mykey IN (array[i],
		array[i+1],...) ORDER BY <whatever>;

for each new page. Also, memory usage per session is easy to estimate for
array if integer primary keys.

View raw message