"Shekhar, Jayant" wrote:
>
> Thanks for your reply Christopher.
>
> Here are my thoughts:
>
Good summary.
It's sort of an issue of "how simple a solution can I
get away with". Without a fairly massive amount of detail
(most of which you probably won't know till the app is
deployed) the best I can do is offer some things to
consider:
- Does it really matter? If you expect the maxiumum number
or rows to be around 1000, and you only expect to have
10 simultaneous users, and each row takes up 1k of space,
then we're really only talking 10MB or so.
- Depending on how often the database is being updated, and
what database you are using, and how the database is set
up, and how the query is written, holding open database
cursors for long periods of time can be a real problem.
It's not just keeping a connection open, there can be
a lot of database-side resources tied up. You'll need to
have a talk with your database administrator.
- Does it matter if the user sees an absolutely consistent
view of the data? In other words, if the user is viewing
a page of data, and the database changes, and the user
asks for the next page, should the user see the original
data or the changed data? Or does it matter?
- Is the database query really a performance bottleneck?
There might be no way to know in advance, which is sort
of frustrating, but it's also why we get paid the big
bucks :-)
- Have you considered using an app framework? Learning
curve can be offputting, but once that's over you get
a lot of bang for your buck. (Or maybe you just get
a training nightmare every time you bring a new person
on board, but that's getting off-topic)
Personally, I'd try to get away with loading everything
into memory. If that doesn't work, then your choice is a
lot more complicated, and depends on if you want to move
the burden into your app (with the "new query each time"
type solution) or into your database (with the "save the
result set each time" option)
One way your database admin will be unhappy, the other
way your webserver admin will be unhappy, talking to both
of them would probably be a good idea...
-cks
___________________________________________________________________________
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