J
james
Hi all,
I'm experiencing some performance issues when processing ResultSet's
containing large amounts of data. The data is typically around 2,000
rows and although the database query only takes 0.9 seconds,
processing the results takes almost 30 seconds. All i'm doing is
iterating through the resultSet and placing the values into an xml
string. The code that does this is shown below.
while(rs.next()) {
// build XML
xmlResult += "<student studentID='" +
rs.getInt("StudentID") + "' firstName='" + rs.getString("FirstName") +
"' lastName='" + rs.getString("LastName") + "' gender='" +
rs.getString("Gender") +"' />";
} // End of loop
xmlResult is of type String, could this be causing performance issues?
I'm pretty new to java so this could just be a simple problem however
googling hasn't brought up much.
TIA
James
I'm experiencing some performance issues when processing ResultSet's
containing large amounts of data. The data is typically around 2,000
rows and although the database query only takes 0.9 seconds,
processing the results takes almost 30 seconds. All i'm doing is
iterating through the resultSet and placing the values into an xml
string. The code that does this is shown below.
while(rs.next()) {
// build XML
xmlResult += "<student studentID='" +
rs.getInt("StudentID") + "' firstName='" + rs.getString("FirstName") +
"' lastName='" + rs.getString("LastName") + "' gender='" +
rs.getString("Gender") +"' />";
} // End of loop
xmlResult is of type String, could this be causing performance issues?
I'm pretty new to java so this could just be a simple problem however
googling hasn't brought up much.
TIA
James