AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problem in Resultset

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java and Databases
View previous topic :: View next topic  
Author Message
Comcast News
Guest





PostPosted: Sat Sep 13, 2003 6:33 pm    Post subject: Problem in Resultset Reply with 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



Back to top
Joseph Weinstein
Guest





PostPosted: Sat Sep 13, 2003 10:31 pm    Post subject: Re: Problem in Resultset Reply with quote





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

Quote:


Thanks
-rahul


Back to top
John Gilson
Guest





PostPosted: Sun Sep 14, 2003 4:31 am    Post subject: Re: Problem in Resultset Reply with quote



"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





PostPosted: Sun Sep 14, 2003 5:14 pm    Post subject: Re: Problem in Resultset Reply with quote

"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
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java and Databases All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.