my dog learned polymorphism
The moose likes JDBC and Relational Databases and the fly likes executing extremely slow Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark " executing extremely slow" Watch " executing extremely slow" New topic
Author executing extremely slow

steph rinert

Joined: Oct 31, 2002
Posts: 7
Help, I have a result set thats used in a while loop and when it reaches, it takes forever to execute. I have maybe 10 small rows within the RS--Why would this be happening? its goes throug the body of the while statment without any delay but once it reaches , it dies for a good 15 to 20 sec. while it executes the .next
while ( {###take long time
for (int i = 1; i <= numColumns; ++i ) {switch( metaData.getColumnType(i)) {
case 2:
doubleTemp = rsProcess.getDouble(i);
if (rsProcessAscii.wasNull( )) {
doubleCol = null;..................
senthil nathan

Joined: Jun 14, 2002
Posts: 17
Within while( you are doing costly operations like getMetaData.Also u r looping inside while which needs to go looping...try to separate the code and see u should be able to see it work faster.
I agree. Here's the link:
subject: executing extremely slow
It's not a secret anymore!