 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Comcast News Guest
|
Posted: Sat Sep 13, 2003 6:33 pm Post subject: Problem in Resultset |
|
|
Hi ,
We are facing a java issue. We are looping thru a resultset which has about
40 K records. The process terminates abnormally after about 20-25K record(
It differs across runs).
The Query has 400 columns. We have recently modified the Query,earlier it
had only 200 columns and the process used to work fine.
Any suggestions !!
Thanks
-rahul
|
|
| Back to top |
|
 |
Joseph Weinstein Guest
|
Posted: Sat Sep 13, 2003 10:31 pm Post subject: Re: Problem in Resultset |
|
|
Comcast News wrote:
| Quote: | Hi ,
We are facing a java issue. We are looping thru a resultset which has about
40 K records. The process terminates abnormally after about 20-25K record(
It differs across runs).
The Query has 400 columns. We have recently modified the Query,earlier it
had only 200 columns and the process used to work fine.
Any suggestions !!
|
The first suggestion is to say whose JDBC driver you are using, to what DBMS, and
what is the exception you get? The second suggestion is that there is a chance that
you are doing the wrong thing to drag thousands and thousands of data rows out
of the DBMS to be manipulated in a client. It would be much more efficient to process
raw data in stored procedures where the data already is, in the DBMS.
Joe Weinstein at BEA
|
|
| Back to top |
|
 |
John Gilson Guest
|
Posted: Sun Sep 14, 2003 4:31 am Post subject: Re: Problem in Resultset |
|
|
"Comcast News" <rahul_rastogi (AT) comcast (DOT) net> wrote
| Quote: | Hi ,
We are facing a java issue. We are looping thru a resultset which has about
40 K records. The process terminates abnormally after about 20-25K record(
It differs across runs).
The Query has 400 columns. We have recently modified the Query,earlier it
had only 200 columns and the process used to work fine.
Any suggestions !!
Thanks
-rahul
|
Are you running out of heap space? By default, the JDK's Java has an
initial heap size of 2MB and can grow to a maximum of 64MB. This
might be inadequate for your needs. The initial size of the heap is
set by the -Xms option to "java" and the maximum heap size is set
by the -Xmx option, e.g., to have an initial heap size of 64MB and a
max heap size of 512MB one would invoke java by
java -Xms64M -Xmx512M app
See the documentation for more info. You might also want to look at
java.sql.ResultSet.setFetchSize().
Regards,
jag
|
|
| Back to top |
|
 |
Dave Glasser Guest
|
Posted: Sun Sep 14, 2003 5:14 pm Post subject: Re: Problem in Resultset |
|
|
"Comcast News" <rahul_rastogi (AT) comcast (DOT) net> wrote on Sat, 13 Sep 2003
14:33:19 -0400 in comp.lang.java.databases:
| Quote: | Hi ,
We are facing a java issue. We are looping thru a resultset which has about
40 K records. The process terminates abnormally after about 20-25K record(
It differs across runs).
The Query has 400 columns. We have recently modified the Query,earlier it
had only 200 columns and the process used to work fine.
Any suggestions !!
|
Yes, provide more information so someone can make an informed guess as
to what is causing your problem.
You say "the process terminates abnormally." What does that mean? Is
there an exception or error thrown before it terminates? If so,
provide a stacktrace. If no exception or error is thrown, have you
made an effort, through use of debugging code or a debugger, to
isolate the line of code in your program where the program terminates?
What kind of database are you using?
What kind of JDBC driver?
What Java version?
What hardware / OS are you running your app on? How much RAM does it
have?
What method of what class is your ResultSet returned by? Better yet,
show the code that creates your resultset and loops through it.
What is the SQL for your query? What was it when it used to work fine?
----
Check out QueryForm, a free, open source, Java/Swing-based
front end for relational databases.
http://qform.sourceforge.net
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|