> > Well then call me a monumental idiot, since our database contains
180,000
> > user records and on occasion we have to query them all.  If Village
actually
> > tries to read them into a Hashtable or Vector that will blow out the
Heap
> > big time.
>
> Well then obviously since you know that that particular query is going to
be
> huge, then you should not use Village for that particular query. Duh. At
the
> same time, you might want to re-evaluate why you are pulling out every
> single user record in a single query. Perhaps your database is not
> normalized enough.

Of course, I didn't know that Villiage wasn't for me until just this moment,
since this question has been asked several times, and never answered until
now.

(P.S.  What is the difference between Duh and No Duh?  Now that's one for
the thinkers to wrap their brains around =8^)

> Also, I'm not advocating using Village for /everything/...I'm only
> advocating using Village for the times where you what to write code
quickly
> without having to worry about how many "?" marks to put into the prepared
> statement or for those of you who are new (or even experienced) to (with)
> JDBC and want to make your lives easier without incurring much overhead.

My point wasn't that Village was not a useful tool, just that you need to
answer questions without the phrase "Look at the source code".  Since most
people won't.  It's far simpler to write it myself than to sift through
someone elses code just to find out whether or not it will do what I need.

> > Instead of making people download and read through your source
> > code, why don't you provide some simple answers to questions posed here
on
> > the list.
>
> If you looked at the code for fetchRecords() you will see that it is less
> than 50 lines. It isn't that big of a deal and the code is available
online
> via cvsweb.
>
> But to answer the question, the way that fetchRecords() works is that it
> only calls ResultSet.next() as many times as it needs to and not a single
> time more. So, if you say fetchRecords(20), then it will only call
> ResultSet.next() 20 times.

This seems like the right thing to do.  Is there room for an optimization
that uses the SQL COUNT operator when someone asks how many rows they will
be getting?  That seems to be a common request, even though that's not the
way I program, I try not to limit others ability to program the way they
prefer.

> >  Most people won't take the time to read every line of source code
> > for every "open source" solution available on the web to find out which
is
> > the best, they want answers to specific questions like this one so that
they
> > can decide.
>
> Well, I was only talking about 50 lines of fairly simple code. There is no
> reason to "read every line of source code for every "open source"
solution".

Assuming you know where to look.
    (*Chris*)

___________________________________________________________________________
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

Reply via email to