1. Show the first ten records of the customer file in alpha sequence.
is the load of the work with customers program, and is done by the
ISAM instructions: OPEN, READ (x10).

2. Position to the first ten records of that file starting with the first
record starting with "G". This is the standard "position to" feature
the user would request. It is executed by SETLL, READ (x10).

3. Give me the PRIOR ten records. This is accomplished by READP (x20)
followed by READ (x10).

At no point is more than three times the page size ever read. In most
cases, there are exactly ten reads. No indices need to be rebuilt.
show us how to do this without three different result sets.

Reading this discussion, I was pondering how I'd try to solve it, but the
way you put this last question pointed out something much more fundamental.
Lets just assume for the minute you can write a single SQL statement and
get a single result set that provides all of the above, and allows the user
to page up/down as they wish. Obviously you've talking about keeping hold
of this result set between each call to the servlet, which means storing
the result set in the users' session, unless I've misunderstood?

Can you get away with doing things like that? I would have thought keeping
the result set open would keep the usage count up on the PreparedStatement,
and that would keep active connections to the DB used up from the
connection pool. How would those connections be freed - we don't know when
the user leaves that particular page - so its only going to be when the
session expires, which could be 30 mins to a couple of hours later. If
you've got thousands of users going to different pages on your site, and
all those pages have page down/up features, wouldn't you use up all your DB
connections from the pool very quickly?

Just curious since it seems an interesting way to try to solve the general
page down/up requirement. I wouldn't have even tried to use less than 3
result sets!


Nigel Gay,
Computer Patent Annuities Limited.

The information in this message is confidential and may be legally
privileged. It is intended solely for the addressee; access to this
email by anyone else is unauthorised.

If you are not the intended recipient: (1) you are kindly requested
to return a copy of this message to the sender indicating that you
have received it in error, and to destroy the received copy; and (2)
any disclosure or distribution of this message, as well as any action
taken or omitted to be taken in reliance on its content, is prohibited
and may be unlawful.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.